From b7f60e347479f485c99c6046a42c97311f35fc62 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 10 Jan 2011 22:34:03 +0000 Subject: Add unnamed_addr when creating artificial string globals. For example, in static const char foo[] = "foo"; static const char *bar = "bar"; the global created to hold "bar" will have it, but foo will not. llvm-svn: 123192 --- clang/test/CodeGen/string-literal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/test/CodeGen/string-literal.c') diff --git a/clang/test/CodeGen/string-literal.c b/clang/test/CodeGen/string-literal.c index 43bfc2137fc..6d02b0fdaf9 100644 --- a/clang/test/CodeGen/string-literal.c +++ b/clang/test/CodeGen/string-literal.c @@ -8,9 +8,9 @@ int main() { // CHECK: internal constant [10 x i8] c"\E1\84\A0\C8\A0\F4\82\80\B0\00", align 1 char b[10] = "\u1120\u0220\U00102030"; - // CHECK: private constant [12 x i8] c"A\00\00\00B\00\00\00\00\00\00\00" + // CHECK: private unnamed_addr constant [12 x i8] c"A\00\00\00B\00\00\00\00\00\00\00" void *foo = L"AB"; - // CHECK: private constant [12 x i8] c"4\12\00\00\0B\F0\10\00\00\00\00\00" + // CHECK: private unnamed_addr constant [12 x i8] c"4\12\00\00\0B\F0\10\00\00\00\00\00" void *bar = L"\u1234\U0010F00B"; } -- cgit v1.2.3