comparison include/llvm/PassAnalysisSupport.h @ 77:54457678186b LLVM3.6

LLVM 3.6
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Mon, 08 Sep 2014 22:06:00 +0900
parents 95c75e76d11b
children 60c9769439b8
comparison
equal deleted inserted replaced
34:e874dbf0ad9d 77:54457678186b
127 127
128 inline PMDataManager &getPMDataManager() { return PM; } 128 inline PMDataManager &getPMDataManager() { return PM; }
129 129
130 // Find pass that is implementing PI. 130 // Find pass that is implementing PI.
131 Pass *findImplPass(AnalysisID PI) { 131 Pass *findImplPass(AnalysisID PI) {
132 Pass *ResultPass = 0; 132 Pass *ResultPass = nullptr;
133 for (unsigned i = 0; i < AnalysisImpls.size() ; ++i) { 133 for (unsigned i = 0; i < AnalysisImpls.size() ; ++i) {
134 if (AnalysisImpls[i].first == PI) { 134 if (AnalysisImpls[i].first == PI) {
135 ResultPass = AnalysisImpls[i].second; 135 ResultPass = AnalysisImpls[i].second;
136 break; 136 break;
137 } 137 }
180 assert(Resolver && "Pass not resident in a PassManager object!"); 180 assert(Resolver && "Pass not resident in a PassManager object!");
181 181
182 const void *PI = &AnalysisType::ID; 182 const void *PI = &AnalysisType::ID;
183 183
184 Pass *ResultPass = Resolver->getAnalysisIfAvailable(PI, true); 184 Pass *ResultPass = Resolver->getAnalysisIfAvailable(PI, true);
185 if (ResultPass == 0) return 0; 185 if (!ResultPass) return nullptr;
186 186
187 // Because the AnalysisType may not be a subclass of pass (for 187 // Because the AnalysisType may not be a subclass of pass (for
188 // AnalysisGroups), we use getAdjustedAnalysisPointer here to potentially 188 // AnalysisGroups), we use getAdjustedAnalysisPointer here to potentially
189 // adjust the return pointer (because the class may multiply inherit, once 189 // adjust the return pointer (because the class may multiply inherit, once
190 // from pass, once from AnalysisType). 190 // from pass, once from AnalysisType).