aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Pass.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Pass.h')
-rw-r--r--include/llvm/Pass.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index 305ac37..247805f 100644
--- a/include/llvm/Pass.h
+++ b/include/llvm/Pass.h
@@ -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