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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2007-05-02 21:39:20 +00:00
parent 749a89bd53
commit 3e15bf33e0
150 changed files with 312 additions and 313 deletions

View File

@@ -36,7 +36,7 @@ namespace {
/// such it doesn't follow many of the rules that other alias analyses must.
///
struct VISIBILITY_HIDDEN NoAA : public ImmutablePass, public AliasAnalysis {
static const int ID; // Class identification, replacement for typeinfo
static const char ID; // Class identification, replacement for typeinfo
NoAA() : ImmutablePass((intptr_t)&ID) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -77,7 +77,7 @@ namespace {
};
// Register this pass...
const int NoAA::ID = 0;
const char NoAA::ID = 0;
RegisterPass<NoAA>
U("no-aa", "No Alias Analysis (always returns 'may' alias)");
@@ -92,7 +92,7 @@ namespace {
/// Because it doesn't chain to a previous alias analysis (like -no-aa), it
/// derives from the NoAA class.
struct VISIBILITY_HIDDEN BasicAliasAnalysis : public NoAA {
static const int ID; // Class identification, replacement for typeinfo
static const char ID; // Class identification, replacement for typeinfo
AliasResult alias(const Value *V1, unsigned V1Size,
const Value *V2, unsigned V2Size);
@@ -124,7 +124,7 @@ namespace {
};
// Register this pass...
const int BasicAliasAnalysis::ID = 0;
const char BasicAliasAnalysis::ID = 0;
RegisterPass<BasicAliasAnalysis>
X("basicaa", "Basic Alias Analysis (default AA impl)");