- // addPreserved - Add the Pass with the specified argument string to the set
- // of analyses preserved by this pass. If no such Pass exists, do nothing.
- // This can be useful when a pass is trivially preserved, but may not be
- // linked in. Be careful about spelling!
- //
- AnalysisUsage &addPreserved(StringRef Arg) {
- const StaticPassInfo *PI = Pass::lookupPassInfo(Arg);
- // If the pass exists, preserve it. Otherwise silently do nothing.
- if (PI) Preserved.push_back(PI);
- return *this;
- }
+ /// Add the Pass with the specified argument string to the set of analyses
+ /// preserved by this pass. If no such Pass exists, do nothing. This can be
+ /// useful when a pass is trivially preserved, but may not be linked in. Be
+ /// careful about spelling!
+ AnalysisUsage &addPreserved(StringRef Arg);