summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/llvm/lib/LTO/ThinLTOCodeGenerator.cpp')
-rw-r--r--gnu/llvm/lib/LTO/ThinLTOCodeGenerator.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/gnu/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/gnu/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
index 1efd481b246..abcd8905ad3 100644
--- a/gnu/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
+++ b/gnu/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
@@ -63,7 +63,6 @@ namespace llvm {
extern cl::opt<bool> LTODiscardValueNames;
extern cl::opt<std::string> LTORemarksFilename;
extern cl::opt<bool> LTOPassRemarksWithHotness;
-extern cl::opt<bool> LTOStripInvalidDebugInfo;
}
namespace {
@@ -77,7 +76,7 @@ static void saveTempBitcode(const Module &TheModule, StringRef TempDir,
if (TempDir.empty())
return;
// User asked to save temps, let dump the bitcode file after import.
- std::string SaveTempPath = (TempDir + llvm::utostr(count) + Suffix).str();
+ std::string SaveTempPath = (TempDir + llvm::Twine(count) + Suffix).str();
std::error_code EC;
raw_fd_ostream OS(SaveTempPath, EC, sys::fs::F_None);
if (EC)
@@ -158,8 +157,7 @@ public:
/// Verify the module and strip broken debug info.
static void verifyLoadedModule(Module &TheModule) {
bool BrokenDebugInfo = false;
- if (verifyModule(TheModule, &dbgs(),
- LTOStripInvalidDebugInfo ? &BrokenDebugInfo : nullptr))
+ if (verifyModule(TheModule, &dbgs(), &BrokenDebugInfo))
report_fatal_error("Broken module found, compilation aborted!");
if (BrokenDebugInfo) {
TheModule.getContext().diagnose(ThinLTODiagnosticInfo(
@@ -583,9 +581,9 @@ std::unique_ptr<TargetMachine> TargetMachineBuilder::create() const {
Features.getDefaultSubtargetFeatures(TheTriple);
std::string FeatureStr = Features.getString();
- return std::unique_ptr<TargetMachine>(TheTarget->createTargetMachine(
- TheTriple.str(), MCpu, FeatureStr, Options, RelocModel,
- CodeModel::Default, CGOptLevel));
+ return std::unique_ptr<TargetMachine>(
+ TheTarget->createTargetMachine(TheTriple.str(), MCpu, FeatureStr, Options,
+ RelocModel, None, CGOptLevel));
}
/**