]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commit
Change the .ll syntax for comdats and add a syntactic sugar.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 6 Jan 2015 22:55:16 +0000 (22:55 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 6 Jan 2015 22:55:16 +0000 (22:55 +0000)
commitf907a26bc28c1c2e9e7026815a5271bc393d2933
tree331be722fdac69ed3a6d89a5d270e5e8dfc28c24
parent8e9ba0e588096d9d8c680999c83350a989bd709d
Change the .ll syntax for comdats and add a syntactic sugar.

In order to make comdats always explicit in the IR, we decided to make
the syntax a bit more compact for the case of a GlobalObject in a
comdat with the same name.

Just dropping the $name causes problems for

@foo = globabl i32 0, comdat
$bar = comdat ...

and

declare void @foo() comdat
$bar = comdat ...

So the syntax is changed to

@g1 = globabl i32 0, comdat($c1)
@g2 = globabl i32 0, comdat

and

declare void @foo() comdat($c1)
declare void @foo() comdat

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225302 91177308-0d34-0410-b5e6-96231b3b80d8
40 files changed:
docs/LangRef.rst
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLParser.h
lib/IR/AsmWriter.cpp
test/Assembler/invalid-comdat.ll
test/Assembler/unnamed-comdat.ll [new file with mode: 0644]
test/CodeGen/X86/coff-comdat.ll
test/CodeGen/X86/coff-comdat2.ll
test/CodeGen/X86/coff-comdat3.ll
test/CodeGen/X86/elf-comdat.ll
test/CodeGen/X86/elf-comdat2.ll
test/CodeGen/X86/macho-comdat.ll
test/Feature/comdat.ll
test/Instrumentation/AddressSanitizer/do-not-touch-comdat-global.ll
test/Linker/Inputs/comdat.ll
test/Linker/Inputs/comdat2.ll
test/Linker/Inputs/comdat3.ll
test/Linker/Inputs/comdat4.ll
test/Linker/Inputs/comdat5.ll
test/Linker/Inputs/comdat8.ll
test/Linker/Inputs/visibility.ll
test/Linker/comdat.ll
test/Linker/comdat2.ll
test/Linker/comdat3.ll
test/Linker/comdat4.ll
test/Linker/comdat5.ll
test/Linker/comdat6.ll
test/Linker/comdat7.ll
test/Linker/comdat8.ll
test/Linker/comdat9.ll
test/Linker/constructor-comdat.ll
test/Linker/visibility.ll
test/Transforms/GlobalDCE/pr20981.ll
test/Transforms/GlobalOpt/pr21191.ll
test/Transforms/GlobalOpt/preserve-comdats.ll
test/Transforms/Inline/pr21206.ll
test/Verifier/comdat.ll
test/Verifier/comdat2.ll
test/tools/gold/Inputs/comdat.ll
test/tools/gold/comdat.ll