summaryrefslogtreecommitdiff
path: root/test/Assembler
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-06-27 18:19:56 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-06-27 18:19:56 +0000
commitc8a1169c935ad9d3dfbdd4f72d80abf8f5acb03c (patch)
treeba02374e6ebac3aeaa3c234be27d92c6224cf34f /test/Assembler
parent4a295dfbf9c5e8a71b8345484eff200058522b4e (diff)
downloadllvm-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/Assembler')
-rw-r--r--test/Assembler/invalid-comdat.ll4
-rw-r--r--test/Assembler/invalid-comdat2.ll5
2 files changed, 9 insertions, 0 deletions
diff --git a/test/Assembler/invalid-comdat.ll b/test/Assembler/invalid-comdat.ll
new file mode 100644
index 0000000000..987e1e1e7d
--- /dev/null
+++ b/test/Assembler/invalid-comdat.ll
@@ -0,0 +1,4 @@
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+
+@v = global i32 0, comdat $v
+; CHECK: use of undefined comdat '$v'
diff --git a/test/Assembler/invalid-comdat2.ll b/test/Assembler/invalid-comdat2.ll
new file mode 100644
index 0000000000..ed656ef2b1
--- /dev/null
+++ b/test/Assembler/invalid-comdat2.ll
@@ -0,0 +1,5 @@
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+
+$v = comdat any
+$v = comdat any
+; CHECK: redefinition of comdat '$v'