Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652
diff --git a/llvm/lib/Transforms/Scalar/Reg2Mem.cpp b/llvm/lib/Transforms/Scalar/Reg2Mem.cpp
index 6abe4dc..17f19d7 100644
--- a/llvm/lib/Transforms/Scalar/Reg2Mem.cpp
+++ b/llvm/lib/Transforms/Scalar/Reg2Mem.cpp
@@ -33,7 +33,7 @@
namespace {
struct VISIBILITY_HIDDEN RegToMem : public FunctionPass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
RegToMem() : FunctionPass((intptr_t)&ID) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -78,7 +78,7 @@
}
};
- const int RegToMem::ID = 0;
+ const char RegToMem::ID = 0;
RegisterPass<RegToMem> X("reg2mem", "Demote all values to stack slots");
}