summaryrefslogtreecommitdiffstats
path: root/llvm/test/Linker/constructor-comdat.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-08-11 17:07:34 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-08-11 17:07:34 +0000
commitb16196a3e0a1daea9d77415d3db24c9ae86a306b (patch)
treed62d531a5b9d51c2673091bfc67187741e4eee38 /llvm/test/Linker/constructor-comdat.ll
parent2ef3f299d5debeba26aac0c50c1727c7a7ac4038 (diff)
downloadbcm5719-llvm-b16196a3e0a1daea9d77415d3db24c9ae86a306b.tar.gz
bcm5719-llvm-b16196a3e0a1daea9d77415d3db24c9ae86a306b.zip
Fix use of uninitialized variable.
Fixes linking bitcode files that use the new style comdats for constructors with ones that don't. llvm-svn: 215364
Diffstat (limited to 'llvm/test/Linker/constructor-comdat.ll')
-rw-r--r--llvm/test/Linker/constructor-comdat.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Linker/constructor-comdat.ll b/llvm/test/Linker/constructor-comdat.ll
new file mode 100644
index 00000000000..42e2d83424a
--- /dev/null
+++ b/llvm/test/Linker/constructor-comdat.ll
@@ -0,0 +1,13 @@
+; RUN: llvm-link %s %p/Inputs/constructor-comdat.ll -S -o - 2>&1 | FileCheck %s
+; RUN: llvm-link %p/Inputs/constructor-comdat.ll %s -S -o - 2>&1 | FileCheck %s
+
+$_ZN3fooIiEC5Ev = comdat any
+; CHECK: $_ZN3fooIiEC5Ev = comdat any
+
+@_ZN3fooIiEC1Ev = weak_odr alias void ()* @_ZN3fooIiEC2Ev
+; CHECK: @_ZN3fooIiEC1Ev = weak_odr alias void ()* @_ZN3fooIiEC2Ev
+
+; CHECK: define weak_odr void @_ZN3fooIiEC2Ev() comdat $_ZN3fooIiEC5Ev {
+define weak_odr void @_ZN3fooIiEC2Ev() comdat $_ZN3fooIiEC5Ev {
+ ret void
+}
OpenPOWER on IntegriCloud