Move assertion with TargetPassConfig's Initialized flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159569 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bob Wilson 2012-07-02 19:48:39 +00:00
parent 3fb99a7368
commit 6b2bb15bf7

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)