diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-15 15:54:37 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-15 15:54:37 +0000 |
| commit | 0eaee545eef49ff9498234d3a51a5cbde59bf976 (patch) | |
| tree | fd7691e102022fb97622c5485fa8c4f506fc124e /llvm/tools/llc | |
| parent | 1c34d10776828c0756ff4f0b2b9aa8bda2be348a (diff) | |
| download | bcm5719-llvm-0eaee545eef49ff9498234d3a51a5cbde59bf976.tar.gz bcm5719-llvm-0eaee545eef49ff9498234d3a51a5cbde59bf976.zip | |
[llvm] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.
llvm-svn: 369013
Diffstat (limited to 'llvm/tools/llc')
| -rw-r--r-- | llvm/tools/llc/llc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index 7df07b90a1d..74ad643496b 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -242,7 +242,7 @@ static std::unique_ptr<ToolOutputFile> GetOutputStream(const char *TargetName, sys::fs::OpenFlags OpenFlags = sys::fs::OF_None; if (!Binary) OpenFlags |= sys::fs::OF_Text; - auto FDOut = llvm::make_unique<ToolOutputFile>(OutputFilename, EC, OpenFlags); + auto FDOut = std::make_unique<ToolOutputFile>(OutputFilename, EC, OpenFlags); if (EC) { WithColor::error() << EC.message() << '\n'; return nullptr; @@ -329,7 +329,7 @@ int main(int argc, char **argv) { // Set a diagnostic handler that doesn't exit on the first error bool HasError = false; Context.setDiagnosticHandler( - llvm::make_unique<LLCDiagnosticHandler>(&HasError)); + std::make_unique<LLCDiagnosticHandler>(&HasError)); Context.setInlineAsmDiagnosticHandler(InlineAsmDiagHandler, &HasError); Expected<std::unique_ptr<ToolOutputFile>> RemarksFileOrErr = @@ -479,7 +479,7 @@ static int compileModule(char **argv, LLVMContext &Context) { std::unique_ptr<ToolOutputFile> DwoOut; if (!SplitDwarfOutputFile.empty()) { std::error_code EC; - DwoOut = llvm::make_unique<ToolOutputFile>(SplitDwarfOutputFile, EC, + DwoOut = std::make_unique<ToolOutputFile>(SplitDwarfOutputFile, EC, sys::fs::OF_None); if (EC) { WithColor::error(errs(), argv[0]) << EC.message() << '\n'; @@ -533,7 +533,7 @@ static int compileModule(char **argv, LLVMContext &Context) { if ((FileType != TargetMachine::CGFT_AssemblyFile && !Out->os().supportsSeeking()) || CompileTwice) { - BOS = make_unique<raw_svector_ostream>(Buffer); + BOS = std::make_unique<raw_svector_ostream>(Buffer); OS = BOS.get(); } |

