[cfe-commits] r46662 - /cfe/trunk/test/CodeGen/merge-statics.c
Chris Lattner
sabre at nondot.org
Fri Feb 1 20:45:42 PST 2008
Author: lattner
Date: Fri Feb 1 22:45:42 2008
New Revision: 46662
URL: http://llvm.org/viewvc/llvm-project?rev=46662&view=rev
Log:
testcase for previous patch.
Added:
cfe/trunk/test/CodeGen/merge-statics.c
Added: cfe/trunk/test/CodeGen/merge-statics.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/merge-statics.c?rev=46662&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/merge-statics.c (added)
+++ cfe/trunk/test/CodeGen/merge-statics.c Fri Feb 1 22:45:42 2008
@@ -0,0 +1,13 @@
+// RUN: clang %s -emit-llvm | grep internal | count 1
+
+// The two decls for 'a' should merge into one llvm GlobalVariable.
+
+struct s { int x; };
+static struct s a;
+
+struct s *ap1 = &a;
+
+static struct s a = {
+ 10
+};
+
More information about the cfe-commits
mailing list