Remove some dead code. CLANG_IS_PRODUCTION is now just a build flag and

is not used in any #ifdef.

llvm-svn: 168703
This commit is contained in:
Rafael Espindola 2012-11-27 16:10:37 +00:00
parent 4ae8b684f5
commit b0448cd52a
6 changed files with 3 additions and 15 deletions

View File

@ -178,7 +178,6 @@ public:
Driver(StringRef _ClangExecutable,
StringRef _DefaultTargetTriple,
StringRef _DefaultImageName,
bool IsProduction,
DiagnosticsEngine &_Diags);
~Driver();

View File

@ -46,7 +46,6 @@ using namespace clang;
Driver::Driver(StringRef ClangExecutable,
StringRef DefaultTargetTriple,
StringRef DefaultImageName,
bool IsProduction,
DiagnosticsEngine &Diags)
: Opts(createDriverOptTable()), Diags(Diags),
ClangExecutable(ClangExecutable), SysRoot(DEFAULT_SYSROOT),

View File

@ -48,7 +48,7 @@ clang::createInvocationFromCommandLine(ArrayRef<const char *> ArgList,
// FIXME: We shouldn't have to pass in the path info.
driver::Driver TheDriver("clang", llvm::sys::getDefaultTargetTriple(),
"a.out", false, *Diags);
"a.out", *Diags);
// Don't check that inputs exist, they may have been remapped.
TheDriver.setCheckInputsExist(false);

View File

@ -48,7 +48,7 @@ static clang::driver::Driver *newDriver(clang::DiagnosticsEngine *Diagnostics,
const std::string DefaultOutputName = "a.out";
clang::driver::Driver *CompilerDriver = new clang::driver::Driver(
BinaryName, llvm::sys::getDefaultTargetTriple(),
DefaultOutputName, false, *Diagnostics);
DefaultOutputName, *Diagnostics);
CompilerDriver->setTitle("clang_based_tool");
return CompilerDriver;
}

View File

@ -63,8 +63,3 @@ else
TOOL_INFO_BUILD_VERSION :=
endif
endif
# Translate make variable to define when building a "production" clang.
ifdef CLANG_IS_PRODUCTION
CPP.Defines += -DCLANG_IS_PRODUCTION
endif

View File

@ -397,13 +397,8 @@ int main(int argc_, const char **argv_) {
DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagClient);
ProcessWarningOptions(Diags, *DiagOpts);
#ifdef CLANG_IS_PRODUCTION
const bool IsProduction = true;
#else
const bool IsProduction = false;
#endif
Driver TheDriver(Path.str(), llvm::sys::getDefaultTargetTriple(),
"a.out", IsProduction, Diags);
"a.out", 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