Move assertion with TargetPassConfig's Initialized flag.

llvm-svn: 159569
This commit is contained in:
Bob Wilson 2012-07-02 19:48:39 +00:00
parent b9b693650a
commit a3f9fa710a
1 changed files with 2 additions and 2 deletions

View File

@ -273,14 +273,14 @@ AnalysisID TargetPassConfig::getPassSubstitution(AnalysisID ID) const {
/// Add a pass to the PassManager.
void TargetPassConfig::addPass(Pass *P) {
assert(!Initialized && "PassConfig is immutable");
PM->add(P);
}
/// Add a CodeGen pass at this point in the pipeline after checking for target
/// and command line overrides.
AnalysisID TargetPassConfig::addPass(AnalysisID PassID) {
assert(!Initialized && "PassConfig is immutable");
AnalysisID TargetID = getPassSubstitution(PassID);
AnalysisID FinalID = overridePass(PassID, TargetID);
if (FinalID == 0)