aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyLibCalls
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-10-29 19:43:31 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-10-29 19:43:31 +0000
commit59e43bde289750a4683879727a9e0e41ab7000a6 (patch)
treeeb55041fdc5971d35d56fadbe473b63f92931499 /test/Transforms/SimplifyLibCalls
parent987d976efc2176e68059387fb1ab793042874327 (diff)
downloadexternal_llvm-59e43bde289750a4683879727a9e0e41ab7000a6.zip
external_llvm-59e43bde289750a4683879727a9e0e41ab7000a6.tar.gz
external_llvm-59e43bde289750a4683879727a9e0e41ab7000a6.tar.bz2
SimplifyLibCalls: Use IRBuilder.CreateGlobalString when creating a string for printf->puts, which correctly sets the unnamed_addr bit on the resulting GlobalVariable.
Fixes PR11264. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143289 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyLibCalls')
-rw-r--r--test/Transforms/SimplifyLibCalls/Printf.ll5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/Transforms/SimplifyLibCalls/Printf.ll b/test/Transforms/SimplifyLibCalls/Printf.ll
index caea311..c98e79a 100644
--- a/test/Transforms/SimplifyLibCalls/Printf.ll
+++ b/test/Transforms/SimplifyLibCalls/Printf.ll
@@ -1,9 +1,10 @@
-; RUN: opt < %s -simplify-libcalls -S -o %t
-; RUN: FileCheck < %t %s
+; RUN: opt < %s -simplify-libcalls -S | FileCheck %s
@str = internal constant [13 x i8] c"hello world\0A\00" ; <[13 x i8]*> [#uses=1]
@str1 = internal constant [2 x i8] c"h\00" ; <[2 x i8]*> [#uses=1]
+; CHECK: internal unnamed_addr constant [12 x i8] c"hello world\00"
+
declare i32 @printf(i8*, ...)
; CHECK: define void @f0