mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 04:09:45 +00:00
21f77df7b6
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247378 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
alias2.ll | ||
aliases.ll | ||
alignment.ll | ||
attributes.ll | ||
basictest.ll | ||
callingconventions.ll | ||
calltest.ll | ||
casttest.ll | ||
cfgstructures.ll | ||
cold.ll | ||
comdat.ll | ||
const_pv.ll | ||
constexpr.ll | ||
constpointer.ll | ||
escaped_label.ll | ||
exception.ll | ||
float.ll | ||
fold-fpcast.ll | ||
forwardreftest.ll | ||
global_pv.ll | ||
global_section.ll | ||
globalredefinition3.ll | ||
globalvars.ll | ||
indirectcall2.ll | ||
indirectcall.ll | ||
inlineasm.ll | ||
instructions.ll | ||
intrinsic-noduplicate.ll | ||
intrinsics.ll | ||
load_module.ll | ||
md_on_instruction.ll | ||
memorymarkers.ll | ||
metadata.ll | ||
minsize_attr.ll | ||
NamedMDNode2.ll | ||
NamedMDNode.ll | ||
newcasts.ll | ||
optnone-llc.ll | ||
optnone-opt.ll | ||
optnone.ll | ||
packed_struct.ll | ||
packed.ll | ||
paramattrs.ll | ||
ppcld.ll | ||
prefixdata.ll | ||
prologuedata.ll | ||
properties.ll | ||
prototype.ll | ||
README.txt | ||
recursivetype.ll | ||
seh-nounwind.ll | ||
simplecalltest.ll | ||
small.ll | ||
smallest.ll | ||
sparcld.ll | ||
terminators.ll | ||
testalloca.ll | ||
testconstants.ll | ||
testlogical.ll | ||
testtype.ll | ||
testvarargs.ll | ||
undefined.ll | ||
unreachable.ll | ||
varargs_new.ll | ||
varargs.ll | ||
vector-cast-constant-exprs.ll | ||
weak_constant.ll | ||
weirdnames.ll | ||
x86ld.ll |
This directory contains test cases for individual source features of LLVM. It is designed to make sure that the major components of LLVM support all of the features of LLVM, for very small examples. Entire programs should not go here. Regression tests for individual bug fixes should go into the test/Regression dir.