summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8f61616)
raw | patch | inline | side by side (parent: 8f61616)
author | Craig Topper <craig.topper@gmail.com> | |
Thu, 11 Dec 2014 07:04:46 +0000 (07:04 +0000) | ||
committer | Craig Topper <craig.topper@gmail.com> | |
Thu, 11 Dec 2014 07:04:46 +0000 (07:04 +0000) |
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224003 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llc/llc.cpp | patch | blob | history |
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index fe4d9ac4f195d4aff16d194249e69d7494965754..b9de56c105d9f8f785c91d03602459d4e9a82919 100644 (file)
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
static int compileModule(char **, LLVMContext &);
-static tool_output_file *GetOutputStream(const char *TargetName,
- Triple::OSType OS,
- const char *ProgName) {
+static std::unique_ptr<tool_output_file>
+GetOutputStream(const char *TargetName, Triple::OSType OS,
+ const char *ProgName) {
// If we don't yet have an output filename, make one.
if (OutputFilename.empty()) {
if (InputFilename == "-")
sys::fs::OpenFlags OpenFlags = sys::fs::F_None;
if (!Binary)
OpenFlags |= sys::fs::F_Text;
- tool_output_file *FDOut = new tool_output_file(OutputFilename, EC, OpenFlags);
+ auto FDOut = llvm::make_unique<tool_output_file>(OutputFilename, EC,
+ OpenFlags);
if (EC) {
errs() << EC.message() << '\n';
- delete FDOut;
return nullptr;
}