std::string *ResultPathName,
std::string *TempPathName);
+ llvm::raw_null_ostream *createNullOutputFile();
+
/// }
/// @name Initialization Utility Methods
/// {
case Backend_EmitNothing:
return nullptr;
case Backend_EmitMCNull:
- return new raw_null_ostream();
+ return CI.createNullOutputFile();
case Backend_EmitObj:
return CI.createDefaultOutputFile(true, InFile, "o");
}
/*UseTemporary=*/true);
}
+llvm::raw_null_ostream *CompilerInstance::createNullOutputFile() {
+ llvm::raw_null_ostream *OS = new llvm::raw_null_ostream();
+ addOutputFile(OutputFile("", "", OS));
+ return OS;
+}
+
llvm::raw_fd_ostream *
CompilerInstance::createOutputFile(StringRef OutputPath,
bool Binary, bool RemoveFileOnSignal,
-// FIXME: this test produces a leak report in clang.
// REQUIRES: x86-registered-target
// RUN: %clang_cc1 %s -emit-llvm-only -triple=i386-apple-darwin -o %t
// RUN: not rm %t
-// FIXME: %clang_cc1 %s -emit-codegen-only -triple=i386-apple-darwin -o %t
-// FIXME: not rm %t
+// RUN: %clang_cc1 %s -emit-codegen-only -triple=i386-apple-darwin -o %t
+// RUN: not rm %t
// Test that output is not generated when emission is disabled.