[PATCH] D23612: [LTO] Change addSaveTemps API: do not add dot to the supplied prefix path

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 16:41:03 PDT 2016


tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.

LGTM with two fixes. One compile failure in gold-plugin.cc noted below, and one test needs the following fix:

diff --git a/test/tools/gold/X86/opt-level.ll b/test/tools/gold/X86/opt-level.ll
index a680a16..66935b4 100644

- a/test/tools/gold/X86/opt-level.ll

+++ b/test/tools/gold/X86/opt-level.ll
@@ -1,13 +1,13 @@
 ; RUN: llvm-as -o %t.bc %s
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -plugin-opt=save-temps \
 ; RUN:    -plugin-opt=O0 -r -o %t.o %t.bc
-; RUN: llvm-dis < %t.o.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O0 %s
+; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O0 %s
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -plugin-opt=save-temps \
 ; RUN:    -plugin-opt=O1 -r -o %t.o %t.bc
-; RUN: llvm-dis < %t.o.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O1 %s
+; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O1 %s
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -plugin-opt=save-temps \
 ; RUN:    -plugin-opt=O2 -r -o %t.o %t.bc
-; RUN: llvm-dis < %t.o.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O2 %s
+; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O2 %s

; CHECK-O0: define internal void @foo(
 ; CHECK-O1: define internal void @foo(


================
Comment at: tools/gold/gold-plugin.cpp:799
@@ -798,2 +798,3 @@
   case options::OT_SAVE_TEMPS:
-    check(Conf.addSaveTemps(output_name, /* UseInputModulePath */ true));
+    check(Conf.addSaveTemps(Twine(output_name) + ".",
+                            /* UseInputModulePath */ true));
----------------
Won't build until Twine removed.


https://reviews.llvm.org/D23612





More information about the llvm-commits mailing list