fix PR3200 by making alias emission use the new infrastructure. Fold
some tests into the alias.c file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67479 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/alias.c b/test/CodeGen/alias.c
index a625b6a..9de1676 100644
--- a/test/CodeGen/alias.c
+++ b/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 @@
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")));
+