mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-26 05:56:51 +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 |
||
---|---|---|
.. | ||
AArch64 | ||
AMDGPU | ||
ARM | ||
Inputs | ||
Mips | ||
X86 | ||
ar-create.test | ||
ar-error.test | ||
archive-delete.test | ||
archive-error-tmp.txt | ||
archive-extract-dir.test | ||
archive-extract.test | ||
archive-format.test | ||
archive-long-index.test | ||
archive-move.test | ||
archive-replace-pos.test | ||
archive-symtab.test | ||
archive-toc.test | ||
archive-update.test | ||
check_binary_output.ll | ||
coff-archive-short.test | ||
coff-archive.test | ||
coff-invalid.test | ||
corrupt.test | ||
directory.ll | ||
dllimport-globalref.ll | ||
dllimport.ll | ||
elf-reloc-no-sym.test | ||
elf-unknown-type.test | ||
invalid.test | ||
kext.test | ||
lit.local.cfg | ||
macho-invalid.test | ||
mangle-ir.ll | ||
mri1.test | ||
mri2.test | ||
mri3.test | ||
mri4.test | ||
mri5.test | ||
mri-addlib.test | ||
mri-addmod.test | ||
mri-crlf.test | ||
nm-archive.test | ||
nm-darwin-m.test | ||
nm-error.test | ||
nm-irix6.test | ||
nm-pe-image.test | ||
nm-shared-object.test | ||
nm-trivial-object.test | ||
nm-universal-binary.test | ||
nm-weak-global-macho.test | ||
no-section-header-string-table.test | ||
no-section-table.test | ||
obj2yaml-coff-long-file-symbol.test | ||
obj2yaml-coff-long-section-name.test | ||
obj2yaml-coff-section-aux-symbol.test | ||
obj2yaml-coff-weak-external.test | ||
obj2yaml-sectiongroup.test | ||
obj2yaml.test | ||
objdump-export-list.test | ||
objdump-file-header.test | ||
objdump-no-sectionheaders.test | ||
objdump-private-headers.test | ||
objdump-reloc-shared.test | ||
objdump-relocations.test | ||
objdump-section-content.test | ||
objdump-sectionheaders.test | ||
objdump-shndx.test | ||
objdump-symbol-table.test | ||
readobj-elf-versioning.test | ||
readobj-shared-object.test | ||
readobj.test | ||
relocation-executable.test | ||
simple-archive.test | ||
size-trivial-macho.test | ||
stackmap-dump.test | ||
yaml2obj-coff-multi-doc.test | ||
yaml2obj-elf-alignment.yaml | ||
yaml2obj-elf-bits-endian.test | ||
yaml2obj-elf-file-headers-with-e_flags.yaml | ||
yaml2obj-elf-file-headers.yaml | ||
yaml2obj-elf-multi-doc.test | ||
yaml2obj-elf-rel-noref.yaml | ||
yaml2obj-elf-rel.yaml | ||
yaml2obj-elf-section-basic.yaml | ||
yaml2obj-elf-section-invalid-size.yaml | ||
yaml2obj-elf-symbol-basic.yaml | ||
yaml2obj-elf-symbol-LocalGlobalWeak.yaml | ||
yaml2obj-elf-symbol-visibility.yaml | ||
yaml2obj-readobj.test |