[llvm-commits] [llvm] r42741 - /llvm/trunk/include/llvm/Pass.h
Chris Lattner
sabre at nondot.org
Sun Oct 7 20:45:44 PDT 2007
Author: lattner
Date: Sun Oct 7 22:45:44 2007
New Revision: 42741
URL: http://llvm.org/viewvc/llvm-project?rev=42741&view=rev
Log:
Allow passes to just pass up "FunctionPass(&ID)" instead of "FunctionPass((intptr_t)&ID)"
Modified:
llvm/trunk/include/llvm/Pass.h
Modified: llvm/trunk/include/llvm/Pass.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Pass.h?rev=42741&r1=42740&r2=42741&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Pass.h (original)
+++ llvm/trunk/include/llvm/Pass.h Sun Oct 7 22:45:44 2007
@@ -86,6 +86,7 @@
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) {}
virtual ~Pass();
/// getPassName - Return a nice clean name for a pass. This usually
@@ -241,6 +242,7 @@
}
explicit ModulePass(intptr_t pid) : Pass(pid) {}
+ explicit ModulePass(const void *pid) : Pass(pid) {}
// Force out-of-line virtual method.
virtual ~ModulePass();
};
@@ -266,6 +268,8 @@
bool runOnModule(Module &M) { return false; }
explicit ImmutablePass(intptr_t pid) : ModulePass(pid) {}
+ explicit ImmutablePass(const void *pid) : ModulePass(pid) {}
+
// Force out-of-line virtual method.
virtual ~ImmutablePass();
};
@@ -282,6 +286,7 @@
class FunctionPass : public Pass {
public:
explicit FunctionPass(intptr_t pid) : Pass(pid) {}
+ explicit FunctionPass(const void *pid) : Pass(pid) {}
/// doInitialization - Virtual method overridden by subclasses to do
/// any necessary per-module initialization.
@@ -333,6 +338,7 @@
class BasicBlockPass : public Pass {
public:
explicit BasicBlockPass(intptr_t pid) : Pass(pid) {}
+ explicit BasicBlockPass(const void *pid) : Pass(pid) {}
/// doInitialization - Virtual method overridden by subclasses to do
/// any necessary per-module initialization.
More information about the llvm-commits
mailing list