diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-01 01:18:23 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-01 01:18:23 +0000 |
commit | 4cc259a469d9f9ce991eb63c4c3e7412c6a5940a (patch) | |
tree | 8b87c80f2b782d4e630ac3c78fcc420e188218b1 /llvm/lib | |
parent | 05cfdd08003d533609786500346d4a0d49aa5830 (diff) | |
download | bcm5719-llvm-4cc259a469d9f9ce991eb63c4c3e7412c6a5940a.tar.gz bcm5719-llvm-4cc259a469d9f9ce991eb63c4c3e7412c6a5940a.zip |
Use StringRef in LTOCodegenerator (NFC)
llvm-svn: 282998
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/LTO/LTOCodeGenerator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp index 6dabdf110ac..81fb58a4e0a 100644 --- a/llvm/lib/LTO/LTOCodeGenerator.cpp +++ b/llvm/lib/LTO/LTOCodeGenerator.cpp @@ -199,7 +199,7 @@ void LTOCodeGenerator::setOptLevel(unsigned Level) { llvm_unreachable("Unknown optimization level!"); } -bool LTOCodeGenerator::writeMergedModules(const char *Path) { +bool LTOCodeGenerator::writeMergedModules(StringRef Path) { if (!determineTarget()) return false; @@ -240,7 +240,7 @@ bool LTOCodeGenerator::compileOptimizedToFile(const char **Name) { SmallString<128> Filename; int FD; - const char *Extension = + StringRef Extension (FileType == TargetMachine::CGFT_AssemblyFile ? "s" : "o"); std::error_code EC = @@ -251,7 +251,7 @@ bool LTOCodeGenerator::compileOptimizedToFile(const char **Name) { } // generate object file - tool_output_file objFile(Filename.c_str(), FD); + tool_output_file objFile(Filename, FD); bool genResult = compileOptimized(&objFile.os()); objFile.os().close(); @@ -586,7 +586,7 @@ bool LTOCodeGenerator::compileOptimized(ArrayRef<raw_pwrite_stream *> Out) { /// setCodeGenDebugOptions - Set codegen debugging options to aid in debugging /// LTO problems. -void LTOCodeGenerator::setCodeGenDebugOptions(const char *Options) { +void LTOCodeGenerator::setCodeGenDebugOptions(StringRef Options) { for (std::pair<StringRef, StringRef> o = getToken(Options); !o.first.empty(); o = getToken(o.second)) CodegenOptions.push_back(o.first); |