summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/constructor-alias.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
committerDimitry Andric <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
commit809500fc2c13c8173a16b052304d983864e4a1e1 (patch)
tree4fc2f184c499d106f29a386c452b49e5197bf63d /test/CodeGenCXX/constructor-alias.cpp
parentbe7c9ec198dcdb5bf73a35bfbb00b3333cb87909 (diff)
Diffstat (limited to 'test/CodeGenCXX/constructor-alias.cpp')
-rw-r--r--test/CodeGenCXX/constructor-alias.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenCXX/constructor-alias.cpp b/test/CodeGenCXX/constructor-alias.cpp
new file mode 100644
index 0000000000000..18a47775012d9
--- /dev/null
+++ b/test/CodeGenCXX/constructor-alias.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -emit-llvm -triple mipsel--linux-gnu -mconstructor-aliases -o - %s | FileCheck %s
+
+// The target attribute code used to get confused with aliases. Make sure
+// we don't crash when an alias is used.
+
+struct B {
+ B();
+};
+B::B() {
+}
+
+// CHECK: @_ZN1BC1Ev = alias void (%struct.B*)* @_ZN1BC2Ev