diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-10-29 19:43:31 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-10-29 19:43:31 +0000 |
commit | 59e43bde289750a4683879727a9e0e41ab7000a6 (patch) | |
tree | eb55041fdc5971d35d56fadbe473b63f92931499 /test/Transforms/SimplifyLibCalls | |
parent | 987d976efc2176e68059387fb1ab793042874327 (diff) | |
download | external_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.ll | 5 |
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 |