mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Add an assert to catch user errors like:
MyFunctionPass() : FunctionPass(ID) {} when the user actually meant to write: MyFunctionPass() : FunctionPass(&ID) {} llvm-svn: 58518
This commit is contained in:
parent
168bd3be1b
commit
e45fc8e8ce
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user