From 59e43bde289750a4683879727a9e0e41ab7000a6 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 29 Oct 2011 19:43:31 +0000 Subject: 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 --- test/Transforms/SimplifyLibCalls/Printf.ll | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/Transforms') diff --git a/test/Transforms/SimplifyLibCalls/Printf.ll b/test/Transforms/SimplifyLibCalls/Printf.ll index caea311ba1..c98e79ae55 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 -- cgit v1.2.3