IR: Add COMDATs to the IR
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 27 Jun 2014 18:19:56 +0000 (18:19 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 27 Jun 2014 18:19:56 +0000 (18:19 +0000)
commitc8a1169c935ad9d3dfbdd4f72d80abf8f5acb03c
treeba02374e6ebac3aeaa3c234be27d92c6224cf34f
parent4a295dfbf9c5e8a71b8345484eff200058522b4e
IR: Add COMDATs to the IR

This new IR facility allows us to represent the object-file semantic of
a COMDAT group.

COMDATs allow us to tie together sections and make the inclusion of one
dependent on another. This is required to implement features like MS
ABI VFTables and optimizing away certain kinds of initialization in C++.

This functionality is only representable in COFF and ELF, Mach-O has no
similar mechanism.

Differential Revision: http://reviews.llvm.org/D4178

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211920 91177308-0d34-0410-b5e6-96231b3b80d8
56 files changed:
docs/LangRef.rst
include/llvm/ADT/UniqueVector.h
include/llvm/Bitcode/LLVMBitCodes.h
include/llvm/IR/Comdat.h [new file with mode: 0644]
include/llvm/IR/GlobalAlias.h
include/llvm/IR/GlobalObject.h
include/llvm/IR/GlobalValue.h
include/llvm/IR/Module.h
include/llvm/Linker/Linker.h
lib/AsmParser/LLLexer.cpp
lib/AsmParser/LLLexer.h
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLParser.h
lib/AsmParser/LLToken.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Reader/BitcodeReader.h
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/Bitcode/Writer/ValueEnumerator.cpp
lib/Bitcode/Writer/ValueEnumerator.h
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
lib/IR/AsmWriter.cpp
lib/IR/AsmWriter.h
lib/IR/CMakeLists.txt
lib/IR/Comdat.cpp [new file with mode: 0644]
lib/IR/Globals.cpp
lib/IR/Module.cpp
lib/IR/Verifier.cpp
lib/Linker/LinkModules.cpp
lib/Transforms/IPO/GlobalDCE.cpp
lib/Transforms/IPO/GlobalOpt.cpp
test/Assembler/invalid-comdat.ll [new file with mode: 0644]
test/Assembler/invalid-comdat2.ll [new file with mode: 0644]
test/CodeGen/X86/coff-comdat.ll [new file with mode: 0644]
test/CodeGen/X86/coff-comdat.s [new file with mode: 0644]
test/CodeGen/X86/coff-comdat2.ll [new file with mode: 0644]
test/CodeGen/X86/coff-comdat3.ll [new file with mode: 0644]
test/CodeGen/X86/elf-comdat.ll [new file with mode: 0644]
test/CodeGen/X86/elf-comdat2.ll [new file with mode: 0644]
test/CodeGen/X86/macho-comdat.ll [new file with mode: 0644]
test/Feature/comdat.ll [new file with mode: 0644]
test/Instrumentation/AddressSanitizer/do-not-instrument-llvm-metadata.ll
test/Linker/Inputs/comdat.ll [new file with mode: 0644]
test/Linker/Inputs/comdat2.ll [new file with mode: 0644]
test/Linker/Inputs/comdat3.ll [new file with mode: 0644]
test/Linker/Inputs/comdat4.ll [new file with mode: 0644]
test/Linker/Inputs/comdat5.ll [new file with mode: 0644]
test/Linker/comdat.ll [new file with mode: 0644]
test/Linker/comdat2.ll [new file with mode: 0644]
test/Linker/comdat3.ll [new file with mode: 0644]
test/Linker/comdat4.ll [new file with mode: 0644]
test/Linker/comdat5.ll [new file with mode: 0644]
test/Linker/comdat6.ll [new file with mode: 0644]
test/Linker/comdat7.ll [new file with mode: 0644]
test/Linker/comdat8.ll [new file with mode: 0644]
test/Verifier/comdat.ll [new file with mode: 0644]
test/Verifier/comdat2.ll [new file with mode: 0644]