summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Compilation.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-07-20 21:16:17 +0000
committerChad Rosier <mcrosier@apple.com>2011-07-20 21:16:17 +0000
commit19886421242f4e3730e2cad1fa452bb4a63a20a2 (patch)
tree85e59a27438780d654d215fff8a164578e50990a /clang/lib/Driver/Compilation.cpp
parent03400e17fe5149c0f2f7161ba3837954e5196ed1 (diff)
downloadbcm5719-llvm-19886421242f4e3730e2cad1fa452bb4a63a20a2.tar.gz
bcm5719-llvm-19886421242f4e3730e2cad1fa452bb4a63a20a2.zip
Temporarily revert r135614 while I fix the cmake build.
llvm-svn: 135621
Diffstat (limited to 'clang/lib/Driver/Compilation.cpp')
-rw-r--r--clang/lib/Driver/Compilation.cpp39
1 files changed, 4 insertions, 35 deletions
diff --git a/clang/lib/Driver/Compilation.cpp b/clang/lib/Driver/Compilation.cpp
index b0e46ff5aee..2657faa0d3a 100644
--- a/clang/lib/Driver/Compilation.cpp
+++ b/clang/lib/Driver/Compilation.cpp
@@ -25,7 +25,7 @@ using namespace clang::driver;
Compilation::Compilation(const Driver &D, const ToolChain &_DefaultToolChain,
InputArgList *_Args, DerivedArgList *_TranslatedArgs)
: TheDriver(D), DefaultToolChain(_DefaultToolChain), Args(_Args),
- TranslatedArgs(_TranslatedArgs), Redirects(0) {
+ TranslatedArgs(_TranslatedArgs) {
}
Compilation::~Compilation() {
@@ -43,13 +43,6 @@ Compilation::~Compilation() {
for (ActionList::iterator it = Actions.begin(), ie = Actions.end();
it != ie; ++it)
delete *it;
-
- // Free redirections of stdout/stderr.
- if (Redirects) {
- delete Redirects[1];
- delete Redirects[2];
- delete Redirects;
- }
}
const DerivedArgList &Compilation::getArgsForToolChain(const ToolChain *TC,
@@ -142,8 +135,8 @@ int Compilation::ExecuteCommand(const Command &C,
std::copy(C.getArguments().begin(), C.getArguments().end(), Argv+1);
Argv[C.getArguments().size() + 1] = 0;
- if ((getDriver().CCCEcho || getDriver().CCPrintOptions ||
- getArgs().hasArg(options::OPT_v)) && !getDriver().CCGenDiagnostics) {
+ if (getDriver().CCCEcho || getDriver().CCPrintOptions ||
+ getArgs().hasArg(options::OPT_v)) {
llvm::raw_ostream *OS = &llvm::errs();
// Follow gcc implementation of CC_PRINT_OPTIONS; we could also cache the
@@ -174,7 +167,7 @@ int Compilation::ExecuteCommand(const Command &C,
std::string Error;
int Res =
llvm::sys::Program::ExecuteAndWait(Prog, Argv,
- /*env*/0, Redirects,
+ /*env*/0, /*redirects*/0,
/*secondsToWait*/0, /*memoryLimit*/0,
&Error);
if (!Error.empty()) {
@@ -202,27 +195,3 @@ int Compilation::ExecuteJob(const Job &J,
return 0;
}
}
-
-void Compilation::initCompilationForDiagnostics(void) {
- // Free actions and jobs, if built.
- for (ActionList::iterator it = Actions.begin(), ie = Actions.end();
- it != ie; ++it)
- delete *it;
- Actions.clear();
- Jobs.clear();
-
- // Clear temporary and results file lists.
- TempFiles.clear();
- ResultFiles.clear();
-
- // Remove any user specified output. Claim any unclaimed arguments, so as
- // to avoid emitting warnings about unused args.
- if (TranslatedArgs->hasArg(options::OPT_o))
- TranslatedArgs->eraseArg(options::OPT_o);
- TranslatedArgs->ClaimAllArgs();
-
- // Redirect stdout/stderr to /dev/null.
- Redirects = new const llvm::sys::Path*[3]();
- Redirects[1] = new const llvm::sys::Path();
- Redirects[2] = new const llvm::sys::Path();
-}
OpenPOWER on IntegriCloud