summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTOBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 317d0163674..b0a7c434b67 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -314,7 +314,7 @@ void codegen(Config &Conf, TargetMachine *TM, AddStreamFn AddStream,
return;
std::unique_ptr<ToolOutputFile> DwoOut;
- SmallString<1024> DwoFile(Conf.DwoPath);
+ SmallString<1024> DwoFile(Conf.SplitDwarfOutput);
if (!Conf.DwoDir.empty()) {
std::error_code EC;
if (auto EC = llvm::sys::fs::create_directories(Conf.DwoDir))
@@ -323,11 +323,12 @@ void codegen(Config &Conf, TargetMachine *TM, AddStreamFn AddStream,
DwoFile = Conf.DwoDir;
sys::path::append(DwoFile, std::to_string(Task) + ".dwo");
- }
+ TM->Options.MCOptions.SplitDwarfFile = DwoFile.str().str();
+ } else
+ TM->Options.MCOptions.SplitDwarfFile = Conf.SplitDwarfFile;
if (!DwoFile.empty()) {
std::error_code EC;
- TM->Options.MCOptions.SplitDwarfFile = DwoFile.str().str();
DwoOut = llvm::make_unique<ToolOutputFile>(DwoFile, EC, sys::fs::F_None);
if (EC)
report_fatal_error("Failed to open " + DwoFile + ": " + EC.message());
OpenPOWER on IntegriCloud