Add a form of addPreserved which takes a string argument, to allow passes
[oota-llvm.git] / include / llvm / Pass.h
index f3f71c870d8671e3ce8151cf5d0e04c08ee8efb1..eb4c92281c9b3951a79dcdbb69ca328800859e9d 100644 (file)
@@ -46,6 +46,7 @@ class PMStack;
 class AnalysisResolver;
 class PMDataManager;
 class raw_ostream;
+class StringRef;
 
 // AnalysisID - Use the PassInfo to identify a pass...
 typedef const PassInfo* AnalysisID;
@@ -164,6 +165,10 @@ public:
   // or null if it is not known.
   static const PassInfo *lookupPassInfo(intptr_t TI);
 
+  // lookupPassInfo - Return the pass info object for the pass with the given
+  // argument string, or null if it is not known.
+  static const PassInfo *lookupPassInfo(const StringRef &Arg);
+
   /// getAnalysisIfAvailable<AnalysisType>() - Subclasses use this function to
   /// get analysis information that might be around, for example to update it.
   /// This is different than getAnalysis in that it can fail (if the analysis