All callers were passing in "a.out" or garbage so a sensible default works fine
here as a cleanup.
This also brings about the possibility of adapting the value based on the
driver's compatibility mode in future.
The setting can still be changed via Driver::DefaultImageName as needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208926
91177308-0d34-0410-b5e6-
96231b3b80d8
IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagClient);
- Driver TheDriver(Path, llvm::sys::getProcessTriple(), "a.out", Diags);
+ Driver TheDriver(Path, llvm::sys::getProcessTriple(), Diags);
TheDriver.setTitle("clang interpreter");
// FIXME: This is a hack to try to force the driver to do something we can
public:
Driver(StringRef _ClangExecutable,
StringRef _DefaultTargetTriple,
- StringRef _DefaultImageName,
DiagnosticsEngine &_Diags);
~Driver();
Driver::Driver(StringRef ClangExecutable,
StringRef DefaultTargetTriple,
- StringRef DefaultImageName,
DiagnosticsEngine &Diags)
: Opts(createDriverOptTable()), Diags(Diags), Mode(GCCMode),
ClangExecutable(ClangExecutable), SysRoot(DEFAULT_SYSROOT),
UseStdLib(true), DefaultTargetTriple(DefaultTargetTriple),
- DefaultImageName(DefaultImageName),
+ DefaultImageName("a.out"),
DriverTitle("clang LLVM compiler"),
CCPrintOptionsFilename(0), CCPrintHeadersFilename(0),
CCLogDiagnosticsFilename(0),
// FIXME: We shouldn't have to pass in the path info.
driver::Driver TheDriver("clang", llvm::sys::getDefaultTargetTriple(),
- "a.out", *Diags);
+ *Diags);
// Don't check that inputs exist, they may have been remapped.
TheDriver.setCheckInputsExist(false);
IntrusiveRefCntPtr<clang::DiagnosticIDs>(new DiagnosticIDs()),
&*DiagOpts, &DiagClient, false);
- // Neither clang executable nor default image name are required since the
- // jobs the driver builds will not be executed.
+ // The clang executable path isn't required since the jobs the driver builds
+ // will not be executed.
std::unique_ptr<driver::Driver> NewDriver(new driver::Driver(
/* ClangExecutable= */ "", llvm::sys::getDefaultTargetTriple(),
- /* DefaultImageName= */ "", Diagnostics));
+ Diagnostics));
NewDriver->setCheckInputsExist(false);
// This becomes the new argv[0]. The value is actually not important as it
/// \brief Builds a clang driver initialized for running clang tools.
static clang::driver::Driver *newDriver(clang::DiagnosticsEngine *Diagnostics,
const char *BinaryName) {
- const char *DefaultOutputName = "a.out";
clang::driver::Driver *CompilerDriver = new clang::driver::Driver(
- BinaryName, llvm::sys::getDefaultTargetTriple(),
- DefaultOutputName, *Diagnostics);
+ BinaryName, llvm::sys::getDefaultTargetTriple(), *Diagnostics);
CompilerDriver->setTitle("clang_based_tool");
return CompilerDriver;
}
DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagClient);
ProcessWarningOptions(Diags, *DiagOpts, /*ReportDiags=*/false);
- Driver TheDriver(Path, llvm::sys::getDefaultTargetTriple(), "a.out", Diags);
+ Driver TheDriver(Path, llvm::sys::getDefaultTargetTriple(), Diags);
// Attempt to find the original path used to invoke the driver, to determine
// the installed path. We do this manually, because we want to support that