diff options
author | Bob Wilson <bob.wilson@apple.com> | 2012-07-02 19:48:39 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2012-07-02 19:48:39 +0000 |
commit | 6b2bb15bf7c77918adc433646846f6847d421257 (patch) | |
tree | babf86251060371af31a6df1adee3f72c93317c1 /lib/CodeGen/Passes.cpp | |
parent | 3fb99a73686c39d9855b3f8881add977af3868cb (diff) |
Move assertion with TargetPassConfig's Initialized flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159569 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Passes.cpp')
-rw-r--r-- | lib/CodeGen/Passes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/Passes.cpp b/lib/CodeGen/Passes.cpp index c64843e2c1..20a3ff45e8 100644 --- a/lib/CodeGen/Passes.cpp +++ b/lib/CodeGen/Passes.cpp @@ -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) |