diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-06-27 18:19:56 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-06-27 18:19:56 +0000 |
commit | c8a1169c935ad9d3dfbdd4f72d80abf8f5acb03c (patch) | |
tree | ba02374e6ebac3aeaa3c234be27d92c6224cf34f /test/Feature | |
parent | 4a295dfbf9c5e8a71b8345484eff200058522b4e (diff) | |
download | llvm-c8a1169c935ad9d3dfbdd4f72d80abf8f5acb03c.tar.gz llvm-c8a1169c935ad9d3dfbdd4f72d80abf8f5acb03c.tar.bz2 llvm-c8a1169c935ad9d3dfbdd4f72d80abf8f5acb03c.tar.xz |
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
Diffstat (limited to 'test/Feature')
-rw-r--r-- | test/Feature/comdat.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Feature/comdat.ll b/test/Feature/comdat.ll new file mode 100644 index 0000000000..6b94a41858 --- /dev/null +++ b/test/Feature/comdat.ll @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | llvm-dis | FileCheck %s + +$f = comdat any +; CHECK: $f = comdat any + +$f2 = comdat any +; CHECK-NOT: f2 + +@v = global i32 0, comdat $f +; CHECK: @v = global i32 0, comdat $f + +define void @f() comdat $f { + ret void +} +; CHECK: define void @f() comdat $f |