summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/test/tools/gold/X86/comdat.ll5
-rw-r--r--llvm/test/tools/gold/X86/strip_names.ll6
-rw-r--r--llvm/test/tools/gold/X86/type-merge2.ll5
-rw-r--r--llvm/tools/gold/gold-plugin.cpp12
4 files changed, 10 insertions, 18 deletions
diff --git a/llvm/test/tools/gold/X86/comdat.ll b/llvm/test/tools/gold/X86/comdat.ll
index c4c5df7aa36..b5a09d8329c 100644
--- a/llvm/test/tools/gold/X86/comdat.ll
+++ b/llvm/test/tools/gold/X86/comdat.ll
@@ -1,9 +1,8 @@
; RUN: llvm-as %s -o %t.o
; RUN: llvm-as %p/Inputs/comdat.ll -o %t2.o
; RUN: %gold -shared -o %t3.o -plugin %llvmshlibdir/LLVMgold.so %t.o %t2.o \
-; RUN: -plugin-opt=no-discard-value-names \
-; RUN: -plugin-opt=emit-llvm
-; RUN: llvm-dis %t3.o -o - | FileCheck %s
+; RUN: -plugin-opt=save-temps
+; RUN: llvm-dis %t3.o.bc -o - | FileCheck %s
$c1 = comdat any
diff --git a/llvm/test/tools/gold/X86/strip_names.ll b/llvm/test/tools/gold/X86/strip_names.ll
index f1b2cff3aaf..495eac9d541 100644
--- a/llvm/test/tools/gold/X86/strip_names.ll
+++ b/llvm/test/tools/gold/X86/strip_names.ll
@@ -1,14 +1,12 @@
; RUN: llvm-as %s -o %t.o
; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
-; RUN: --plugin-opt=emit-llvm \
-; RUN: --plugin-opt=no-discard-value-names \
+; RUN: --plugin-opt=save-temps \
; RUN: -shared %t.o -o %t2.o
-; RUN: llvm-dis %t2.o -o - | FileCheck %s
+; RUN: llvm-dis %t2.o.bc -o - | FileCheck %s
; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=emit-llvm \
-; RUN: --plugin-opt=discard-value-names \
; RUN: -shared %t.o -o %t2.o
; RUN: llvm-dis %t2.o -o - | FileCheck ---check-prefix=NONAME %s
diff --git a/llvm/test/tools/gold/X86/type-merge2.ll b/llvm/test/tools/gold/X86/type-merge2.ll
index 205dd752a01..449fd216503 100644
--- a/llvm/test/tools/gold/X86/type-merge2.ll
+++ b/llvm/test/tools/gold/X86/type-merge2.ll
@@ -1,10 +1,9 @@
; RUN: llvm-as %s -o %t.o
; RUN: llvm-as %p/Inputs/type-merge2.ll -o %t2.o
; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
-; RUN: --plugin-opt=emit-llvm \
-; RUN: --plugin-opt=no-discard-value-names \
+; RUN: --plugin-opt=save-temps \
; RUN: -shared %t.o %t2.o -o %t3.o
-; RUN: llvm-dis %t3.o -o - | FileCheck %s
+; RUN: llvm-dis %t3.o.bc -o - | FileCheck %s
%zed = type { i8 }
define void @foo() {
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 46a5f4668b1..013660b6b57 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -166,10 +166,8 @@ namespace options {
static unsigned Parallelism = 0;
#ifdef NDEBUG
static bool DisableVerify = true;
- static bool DiscardValueNames = true;
#else
static bool DisableVerify = false;
- static bool DiscardValueNames = false;
#endif
static std::string obj_path;
static std::string extra_library_path;
@@ -226,10 +224,6 @@ namespace options {
message(LDPL_FATAL, "Invalid parallelism level: %s", opt_ + 5);
} else if (opt == "disable-verify") {
DisableVerify = true;
- } else if (opt == "discard-value-names") {
- DiscardValueNames = true;
- } else if (opt == "no-discard-value-names") {
- DiscardValueNames = false;
} else {
// Save this option to pass to the code generator.
// ParseCommandLineOptions() expects argv[0] to be program name. Lazily
@@ -1119,7 +1113,8 @@ static void thinLTOBackendTask(claimed_file &F, const void *View,
raw_fd_ostream *OS, unsigned TaskID) {
// Need to use a separate context for each task
LLVMContext Context;
- Context.setDiscardValueNames(options::DiscardValueNames);
+ Context.setDiscardValueNames(options::TheOutputType !=
+ options::OT_SAVE_TEMPS);
Context.enableDebugTypeODRUniquing(); // Merge debug info types.
Context.setDiagnosticHandler(diagnosticHandlerForContext, nullptr, true);
@@ -1242,7 +1237,8 @@ static ld_plugin_status allSymbolsReadHook(raw_fd_ostream *ApiFile) {
}
LLVMContext Context;
- Context.setDiscardValueNames(options::DiscardValueNames);
+ Context.setDiscardValueNames(options::TheOutputType !=
+ options::OT_SAVE_TEMPS);
Context.enableDebugTypeODRUniquing(); // Merge debug info types.
Context.setDiagnosticHandler(diagnosticHandlerForContext, nullptr, true);
OpenPOWER on IntegriCloud