Changeset View
Changeset View
Standalone View
Standalone View
lib/Driver/Compilation.cpp
Show All 34 Lines | Compilation::~Compilation() { | ||||
// Free any derived arg lists. | // Free any derived arg lists. | ||||
for (llvm::DenseMap<std::pair<const ToolChain*, const char*>, | for (llvm::DenseMap<std::pair<const ToolChain*, const char*>, | ||||
DerivedArgList*>::iterator it = TCArgs.begin(), | DerivedArgList*>::iterator it = TCArgs.begin(), | ||||
ie = TCArgs.end(); it != ie; ++it) | ie = TCArgs.end(); it != ie; ++it) | ||||
if (it->second != TranslatedArgs) | if (it->second != TranslatedArgs) | ||||
delete it->second; | delete it->second; | ||||
// Free the actions, if built. | |||||
for (ActionList::iterator it = Actions.begin(), ie = Actions.end(); | |||||
it != ie; ++it) | |||||
delete *it; | |||||
// Free redirections of stdout/stderr. | // Free redirections of stdout/stderr. | ||||
if (Redirects) { | if (Redirects) { | ||||
delete Redirects[1]; | delete Redirects[1]; | ||||
delete Redirects[2]; | delete Redirects[2]; | ||||
delete [] Redirects; | delete [] Redirects; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | if (FailingCommands.empty()) | ||||
return false; | return false; | ||||
for (FailingCommandList::const_iterator CI = FailingCommands.begin(), | for (FailingCommandList::const_iterator CI = FailingCommands.begin(), | ||||
CE = FailingCommands.end(); CI != CE; ++CI) | CE = FailingCommands.end(); CI != CE; ++CI) | ||||
if (A == &(CI->second->getSource())) | if (A == &(CI->second->getSource())) | ||||
return true; | return true; | ||||
for (Action::const_iterator AI = A->begin(), AE = A->end(); AI != AE; ++AI) | for (Action::const_iterator AI = A->begin(), AE = A->end(); AI != AE; ++AI) | ||||
if (ActionFailed(*AI, FailingCommands)) | if (ActionFailed(AI->get(), FailingCommands)) | ||||
return true; | return true; | ||||
return false; | return false; | ||||
} | } | ||||
static bool InputsOk(const Command &C, | static bool InputsOk(const Command &C, | ||||
const FailingCommandList &FailingCommands) { | const FailingCommandList &FailingCommands) { | ||||
return !ActionFailed(&C.getSource(), FailingCommands); | return !ActionFailed(&C.getSource(), FailingCommands); | ||||
Show All 9 Lines | if (int Res = ExecuteCommand(Job, FailingCommand)) | ||||
FailingCommands.push_back(std::make_pair(Res, FailingCommand)); | FailingCommands.push_back(std::make_pair(Res, FailingCommand)); | ||||
} | } | ||||
} | } | ||||
void Compilation::initCompilationForDiagnostics() { | void Compilation::initCompilationForDiagnostics() { | ||||
ForDiagnostics = true; | ForDiagnostics = true; | ||||
// Free actions and jobs. | // Free actions and jobs. | ||||
DeleteContainerPointers(Actions); | Actions.clear(); | ||||
Jobs.clear(); | Jobs.clear(); | ||||
// Clear temporary/results file lists. | // Clear temporary/results file lists. | ||||
TempFiles.clear(); | TempFiles.clear(); | ||||
ResultFiles.clear(); | ResultFiles.clear(); | ||||
FailureResultFiles.clear(); | FailureResultFiles.clear(); | ||||
// Remove any user specified output. Claim any unclaimed arguments, so as | // Remove any user specified output. Claim any unclaimed arguments, so as | ||||
Show All 19 Lines |