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/LoopUnroll.cpp b/llvm/lib/Transforms/Scalar/LoopUnroll.cpp
index 0cdef0f..b3671a9 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnroll.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopUnroll.cpp
@@ -49,7 +49,7 @@
class VISIBILITY_HIDDEN LoopUnroll : public LoopPass {
LoopInfo *LI; // The current loop information
public:
- static const int ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
LoopUnroll() : LoopPass((intptr_t)&ID) {}
bool runOnLoop(Loop *L, LPPassManager &LPM);
@@ -66,7 +66,7 @@
AU.addPreserved<LoopInfo>();
}
};
- const int LoopUnroll::ID = 0;
+ const char LoopUnroll::ID = 0;
RegisterPass<LoopUnroll> X("loop-unroll", "Unroll loops");
}