diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-03-09 03:06:56 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-03-09 03:06:56 +0000 |
commit | effcd47eef464765c84130b667ef296da104756e (patch) | |
tree | 8745231f3534d28da539093bcc97ac57e18fe5f4 /clang/test/CodeGenCXX/static-init.cpp | |
parent | 1bb80affe85d3497457645dd20957136f708468a (diff) | |
download | llvm-effcd47eef464765c84130b667ef296da104756e.zip llvm-effcd47eef464765c84130b667ef296da104756e.tar.gz llvm-effcd47eef464765c84130b667ef296da104756e.tar.bz2 |
Make sure constant emission handles initializer lists with strings correctly. Part of <rdar://problem/10957867>.
llvm-svn: 152370
Diffstat (limited to 'clang/test/CodeGenCXX/static-init.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/static-init.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/static-init.cpp b/clang/test/CodeGenCXX/static-init.cpp index 9e2673c..2db54c2 100644 --- a/clang/test/CodeGenCXX/static-init.cpp +++ b/clang/test/CodeGenCXX/static-init.cpp @@ -1,6 +1,7 @@ // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s // CHECK: @_ZZ1hvE1i = internal global i32 0, align 4 +// CHECK: @base_req = global [4 x i8] c"foo\00", align 1 // CHECK: @_ZZN5test1L6getvarEiE3var = internal constant [4 x i32] [i32 1, i32 0, i32 2, i32 4], align 16 // CHECK: @_ZZ2h2vE1i = linkonce_odr global i32 0 @@ -59,3 +60,6 @@ namespace test1 { void test() { (void) getvar(2); } } + +// Make sure we emit the initializer correctly for the following: +char base_req[] = { "foo" }; |