On x86 favors folding short immediate into some arithmetic operations (e.g. add,...
[oota-llvm.git] / include / llvm / Pass.h
index bc6b39bbb3145c07a69f3f6480d0344ba9313aad..247805f4dbfa8eafcef1c2716048cde4c9a321d1 100644 (file)
@@ -81,8 +81,12 @@ class Pass {
   void operator=(const Pass&);  // DO NOT IMPLEMENT
   Pass(const Pass &);           // DO NOT IMPLEMENT
 public:
-  explicit Pass(intptr_t pid) : Resolver(0), PassID(pid) {}
-  explicit Pass(const void *pid) : Resolver(0), PassID((intptr_t)pid) {}
+  explicit Pass(intptr_t pid) : Resolver(0), PassID(pid) {
+    assert(pid && "pid cannot be 0");
+  }
+  explicit Pass(const void *pid) : Resolver(0), PassID((intptr_t)pid) {
+    assert(pid && "pid cannot be 0"); 
+  }
   virtual ~Pass();
 
   /// getPassName - Return a nice clean name for a pass.  This usually
@@ -125,7 +129,6 @@ public:
     Resolver = AR; 
   }
   inline AnalysisResolver *getResolver() { 
-    assert (Resolver && "Resolver is not set");
     return Resolver; 
   }