aboutsummaryrefslogtreecommitdiff
path: root/tools/driver/driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/driver/driver.cpp')
-rw-r--r--tools/driver/driver.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp
index 5776c4f592..34d3327c5f 100644
--- a/tools/driver/driver.cpp
+++ b/tools/driver/driver.cpp
@@ -319,8 +319,6 @@ int main(int argc_, const char **argv_) {
TheDriver.CCCGenericGCCName = "g++";
}
- llvm::OwningPtr<Compilation> C;
-
// Handle CC_PRINT_OPTIONS and CC_PRINT_OPTIONS_FILE.
TheDriver.CCPrintOptions = !!::getenv("CC_PRINT_OPTIONS");
if (TheDriver.CCPrintOptions)
@@ -351,12 +349,12 @@ int main(int argc_, const char **argv_) {
argv.insert(&argv[1], ExtraArgs.begin(), ExtraArgs.end());
}
- C.reset(TheDriver.BuildCompilation(argv.size(), &argv[0]));
+ llvm::OwningPtr<Compilation> C(TheDriver.BuildCompilation(argv.size(),
+ &argv[0]));
int Res = 0;
if (C.get())
Res = TheDriver.ExecuteCompilation(*C);
-
// If any timers were active but haven't been destroyed yet, print their
// results now. This happens in -disable-free mode.