summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/alias.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-22 21:21:57 +0000
committerChris Lattner <sabre@nondot.org>2009-03-22 21:21:57 +0000
commita5ae54acc4608c6b479720a77610c3f2a60c7372 (patch)
treea4e9ebe0ea79756957ad3a4ae69f917d37690c56 /clang/test/CodeGen/alias.c
parentd4808924450e86391475b7c6e6c119cd642ae971 (diff)
downloadbcm5719-llvm-a5ae54acc4608c6b479720a77610c3f2a60c7372.tar.gz
bcm5719-llvm-a5ae54acc4608c6b479720a77610c3f2a60c7372.zip
fix PR3200 by making alias emission use the new infrastructure. Fold
some tests into the alias.c file. llvm-svn: 67479
Diffstat (limited to 'clang/test/CodeGen/alias.c')
-rw-r--r--clang/test/CodeGen/alias.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/clang/test/CodeGen/alias.c b/clang/test/CodeGen/alias.c
index a625b6aea10..9de1676f4d0 100644
--- a/clang/test/CodeGen/alias.c
+++ b/clang/test/CodeGen/alias.c
@@ -2,7 +2,7 @@
// RUN: grep '@g0 = common global i32 0' %t &&
// RUN: grep '@f1 = alias void ()\* @f0' %t &&
// RUN: grep '@g1 = alias i32\* @g0' %t &&
-// RUN: grep 'define void @f0() nounwind {' %t
+// RUN: grep 'define void @f0() nounwind {' %t &&
void f0(void) { }
extern void f1(void);
@@ -11,3 +11,15 @@ extern void f1(void) __attribute((alias("f0")));
int g0;
extern int g1;
extern int g1 __attribute((alias("g0")));
+
+// Make sure that aliases cause referenced values to be emitted.
+// PR3200
+// RUN: grep 'define internal i32 @foo1()' %t &&
+static inline int foo1() { return 0; }
+int foo() __attribute__((alias("foo1")));
+
+
+// RUN: grep '@bar1 = internal global i32 42' %t
+static inline int bar1 = 42;
+int bar() __attribute__((alias("bar1")));
+
OpenPOWER on IntegriCloud