llvm-project/llvm/test/DebugInfo
David Blaikie 2f40830dde [opaque pointer type] Add textual IR support for explicit type parameter for global aliases
update.py:
import fileinput
import sys
import re

alias_match_prefix = r"(.*(?:=|:|^)\s*(?:external |)(?:(?:private|internal|linkonce|linkonce_odr|weak|weak_odr|common|appending|extern_weak|available_externally) )?(?:default |hidden |protected )?(?:dllimport |dllexport )?(?:unnamed_addr |)(?:thread_local(?:\([a-z]*\))? )?alias"
plain = re.compile(alias_match_prefix + r" (.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|addrspacecast|\[\[[a-zA-Z]|\{\{).*$)")
cast  = re.compile(alias_match_prefix + r") ((?:bitcast|inttoptr|addrspacecast)\s*\(.* to (.*?)(| addrspace\(\d+\) *)\*\)\s*(?:;.*)?$)")
gep   = re.compile(alias_match_prefix + r") ((?:getelementptr)\s*(?:inbounds)?\s*\((?P<type>.*), (?P=type)(?:\s*addrspace\(\d+\)\s*)?\* .*\)\s*(?:;.*)?$)")

def conv(line):
  m = re.match(cast, line)
  if m:
    return m.group(1) + " " + m.group(3) + ", " + m.group(2)
  m = re.match(gep, line)
  if m:
    return m.group(1) + " " + m.group(3) + ", " + m.group(2)
  m = re.match(plain, line)
  if m:
    return m.group(1) + ", " + m.group(2) + m.group(3) + "*" + m.group(4) + "\n"
  return line

for line in sys.stdin:
  sys.stdout.write(conv(line))

apply.sh:
for name in "$@"
do
  python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name"
  rm -f "$name.tmp"
done

The actual commands:
From llvm/src:
find test/ -name *.ll | xargs ./apply.sh
From llvm/src/tools/clang:
find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}"
From llvm/src/tools/polly:
find test/ -name *.ll | xargs ./apply.sh

llvm-svn: 247378
2015-09-11 03:22:04 +00:00
..
AArch64 DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
ARM DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
COFF DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
Inputs DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
Mips DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
PDB [llvm-pdbdump] Display full enum definitions. 2015-03-04 06:09:53 +00:00
PowerPC DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
Sparc DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
SystemZ DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
X86 [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
2009-10-16-Phi.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
2009-11-03-InsertExtractValue.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
2009-11-05-DeadGlobalVariable.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2009-11-06-NamelessGlobalVariable.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
2009-11-10-CurrentFn.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-01-05-DbgScope.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-03-12-llc-crash.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-03-19-DbgDeclare.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-03-24-MemberFn.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-04-06-NestedFnDbgInfo.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-04-19-FramePtr.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-05-03-DisableFramePtr.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-05-03-OriginDIE.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-05-10-MultipleCU.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-06-29-InlinedFnLocalVar.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-07-19-Crash.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-10-01-crash.ll AsmPrinter: Allow null subroutine type 2015-08-28 21:38:24 +00:00
PR20038.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
accel-table-hash-collisions.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
arm-relocs.test Add support for the R_ARM_ABS32 relocation. 2014-04-03 02:27:00 +00:00
array.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
block-asan.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
bug_null_debuginfo.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
constant-pointers.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
constant-sdnodes-have-dbg-location.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
constantfp-sdnodes-have-dbg-location.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
cross-cu-inlining.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
cross-cu-linkonce-distinct.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
cross-cu-linkonce.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
cu-range-hole.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
cu-ranges.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
dead-argument-order.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
debug-info-always-inline.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
debug-info-qualifiers.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
debuginfofinder-forward-declaration.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
debuginfofinder-multiple-cu.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
debuglineinfo-macho.test [DWARF] Fix a bug in line info handling 2015-05-31 23:37:04 +00:00
debuglineinfo.test [DWARF] Fix a bug in line info handling 2015-05-31 23:37:04 +00:00
dwarf-public-names.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
dwarfdump-64-bit-dwarf.test DebugInfo: .debug_line DWARF64 support 2015-05-28 15:38:17 +00:00
dwarfdump-accel.test Fix a bunch of trivial cases of 'CHECK[^:]*$' in the tests. NFCI 2015-08-10 19:01:27 +00:00
dwarfdump-debug-frame-simple.test [dwarfdump] Make debug_frame dump actually useful. 2015-02-25 21:30:22 +00:00
dwarfdump-debug-loc-simple.test
dwarfdump-dump-flags.test [dwarfdump] Ignore scattered relocations for mach-o. 2015-07-31 20:22:50 +00:00
dwarfdump-invalid.test Make llvm-dwarfdump exit with non-zero exit code if error was occured. 2015-06-25 23:40:15 +00:00
dwarfdump-line-dwo.test
dwarfdump-macho-relocs.test [dwarfdump] Do not apply relocations in mach-o files if there is no LoadedObjectInfo. 2015-08-23 04:44:21 +00:00
dwarfdump-macho-universal.test Don't use test inputs from other directories. 2015-08-03 11:59:45 +00:00
dwarfdump-objc.test [dwarfdump] Prettyprint DW_AT_APPLE_property_attribute bitfield values. 2014-10-10 15:51:10 +00:00
dwarfdump-pubnames.test
dwarfdump-ranges.test [dwarfdump] Dump DW_AT_ranges values inline in the debug_info dump. 2014-10-23 04:08:34 +00:00
dwarfdump-type-units.test
dwarfdump-zlib.test Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that. 2014-05-19 18:45:32 +00:00
empty.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
enum-types.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
enum.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
global.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
gmlt.test test: XFAIL the non-darwin gmlt test on darwin 2014-10-01 05:45:45 +00:00
gvn.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
incorrect-variable-debugloc.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
incorrect-variable-debugloc1.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inheritance.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inline-debug-info-multiret.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inline-debug-info.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inline-no-debug-info.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inline-scopes.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inlined-arguments.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inlined-vars.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
lit.local.cfg Update test suite to make "ninja check" succeed without native backend builtin 2015-08-04 06:32:54 +00:00
llvm-symbolizer-zlib.test Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that. 2014-05-19 18:45:32 +00:00
llvm-symbolizer.test Remove "REQUIRES:shell" from tests. They work for me. 2014-11-04 13:41:33 +00:00
location-verifier.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
lto-comp-dir.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
member-order.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
member-pointers.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
member-pointers.o Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
missing-abstract-variable.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
missing-abstract-variable.o Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
multiline.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
namespace.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
namespace_function_definition.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
namespace_inline_function_definition.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
nodebug.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
piece-verifier.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
restrict.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
sugared-constants.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
template-recursive-void.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
tu-composite.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
tu-member-pointer.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
two-cus-from-same-file.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
typedef.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
unconditional-branch.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
varargs.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
version.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00