https://llvm.org/bugs/show_bug.cgi?id=31674
Bug ID: 31674 Summary: ExtractGV externalizes private strings Product: libraries Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: Interprocedural Optimizations Assignee: unassignedb...@nondot.org Reporter: dav...@freebsd.org CC: bigchees...@gmail.com, llvm-bugs@lists.llvm.org Classification: Unclassified Testcase: $ cat test.ll @.str.47 = private unnamed_addr constant [10 x i8] c"anonymous\00", align 1 define i32 @patatino(i8* nonnull %myptr) { %blah = call i32 @strcmp(i8* nonnull %myptr, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.47, i64 0, i64 0)) ret i32 %blah } declare i32 @strcmp(i8* nocapture, i8* nocapture) local_unnamed_addr $ ./llvm-extract patatino.ll -func=patatino -S ; ModuleID = 'patatino.ll' source_filename = "patatino.ll" @.str.47 = external hidden unnamed_addr constant [10 x i8], align 1 define i32 @patatino(i8* nonnull %myptr) { %blah = call i32 @strcmp(i8* nonnull %myptr, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.47, i64 0, i64 0)) ret i32 %blah } declare i32 @strcmp(i8* nocapture, i8* nocapture) local_unnamed_addr In the output, @.str.47 should be extracted (found out while reducing an optimization bug and moving a given function to its own object file, and observing a link failure because the private string was internalized and the linker wasn't able to resolve the symbol). -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs