mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-07 16:54:48 +00:00
Add an assert to catch user errors like:
MyFunctionPass() : FunctionPass(ID) {} when the user actually meant to write: MyFunctionPass() : FunctionPass(&ID) {} git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58518 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9ed08f4a41
commit
d24931632b
@ -81,8 +81,12 @@ class Pass {
|
|||||||
void operator=(const Pass&); // DO NOT IMPLEMENT
|
void operator=(const Pass&); // DO NOT IMPLEMENT
|
||||||
Pass(const Pass &); // DO NOT IMPLEMENT
|
Pass(const Pass &); // DO NOT IMPLEMENT
|
||||||
public:
|
public:
|
||||||
explicit Pass(intptr_t pid) : Resolver(0), PassID(pid) {}
|
explicit Pass(intptr_t pid) : Resolver(0), PassID(pid) {
|
||||||
explicit Pass(const void *pid) : Resolver(0), PassID((intptr_t)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();
|
virtual ~Pass();
|
||||||
|
|
||||||
/// getPassName - Return a nice clean name for a pass. This usually
|
/// getPassName - Return a nice clean name for a pass. This usually
|
||||||
|
Loading…
Reference in New Issue
Block a user