1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 22:12:57 +02:00
llvm-mirror/test/Linker/Inputs
David Blaikie 65b92c4f37 [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
..
apple-version
2003-01-30-LinkerRename.ll
2003-05-31-LinkerRename.ll
alias.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
alignment.ll
basiclink.a.ll
basiclink.b.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
comdat2.ll
comdat3.ll
comdat4.ll
comdat5.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
comdat8.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
comdat.ll
ConstantGlobals.ll
constructor-comdat.ll
ctors.ll
datalayout-a.ll
datalayout-b.ll
distinct.ll
drop-debug.bc Work around pr23045 and make it easier to reproduce. 2015-03-27 15:55:06 +00:00
ident.a.ll
ident.b.ll
linkage2.ll
linkage.a.ll
linkage.b.ll
linkage.c.ll New bitcode linker flags: 2015-09-01 17:55:55 +00:00
mdlocation.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
metadata-function.ll Linker: Copy over function metadata attachments 2015-04-24 22:07:31 +00:00
module-flags-dont-change-others.ll
module-flags-pic-1-b.ll
module-flags-pic-2-b.ll
old_global_ctors.3.4.bc
opaque.ll
override-different-linkage.ll Linker: Add flag to override linkage rules 2015-04-22 04:11:00 +00:00
override-with-internal-linkage-2.ll Linker: Add flag to override linkage rules 2015-04-22 04:11:00 +00:00
override-with-internal-linkage.ll Linker: Add flag to override linkage rules 2015-04-22 04:11:00 +00:00
override.ll Linker: Add flag to override linkage rules 2015-04-22 04:11:00 +00:00
pr21374.ll
pr22807-1.ll
pr22807-2.ll
PR8300.a.ll
PR8300.b.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
PR11464.a.ll
PR11464.b.ll
redefinition.ll
replaced-function-matches-first-subprogram.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
subprogram-linkonce-weak.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
targettriple-a.ll
targettriple-b.ll
targettriple-c.ll
testlink.ll
type-unique-alias.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
type-unique-dst-types2.ll
type-unique-dst-types3.ll
type-unique-inheritance-a.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
type-unique-inheritance-b.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
type-unique-name.ll
type-unique-opaque.ll
type-unique-simple2-a.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
type-unique-simple2-b.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
type-unique-unrelated2.ll
type-unique-unrelated3.ll
unique-fwd-decl-b.ll
unique-fwd-decl-order.ll
visibility.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00