aboutsummaryrefslogtreecommitdiffstats
path: root/tools/opt/opt.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-05-02 21:39:20 +0000
committerDevang Patel <dpatel@apple.com>2007-05-02 21:39:20 +0000
commit3e15bf33e024b9df9e89351a165acfdb1dde51ed (patch)
tree2a1b470e139345efc714c51846d285e5a52a9f12 /tools/opt/opt.cpp
parent749a89bd53422c2aba0d78dc6e72a6d498b453e1 (diff)
downloadexternal_llvm-3e15bf33e024b9df9e89351a165acfdb1dde51ed.zip
external_llvm-3e15bf33e024b9df9e89351a165acfdb1dde51ed.tar.gz
external_llvm-3e15bf33e024b9df9e89351a165acfdb1dde51ed.tar.bz2
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
Diffstat (limited to 'tools/opt/opt.cpp')
-rw-r--r--tools/opt/opt.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index 680bb5f..3df54f2 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -98,7 +98,7 @@ AnalyzeOnly("analyze", cl::desc("Only perform analysis, no optimization"));
namespace {
struct ModulePassPrinter : public ModulePass {
- static const int ID;
+ static const char ID;
const PassInfo *PassToPrint;
ModulePassPrinter(const PassInfo *PI) : ModulePass((intptr_t)&ID),
PassToPrint(PI) {}
@@ -121,10 +121,10 @@ struct ModulePassPrinter : public ModulePass {
}
};
-const int ModulePassPrinter::ID = 0;
+const char ModulePassPrinter::ID = 0;
struct FunctionPassPrinter : public FunctionPass {
const PassInfo *PassToPrint;
- static const int ID;
+ static const char ID;
FunctionPassPrinter(const PassInfo *PI) : FunctionPass((intptr_t)&ID),
PassToPrint(PI) {}
@@ -146,10 +146,10 @@ struct FunctionPassPrinter : public FunctionPass {
}
};
-const int FunctionPassPrinter::ID = 0;
+const char FunctionPassPrinter::ID = 0;
struct BasicBlockPassPrinter : public BasicBlockPass {
const PassInfo *PassToPrint;
- static const int ID;
+ static const char ID;
BasicBlockPassPrinter(const PassInfo *PI)
: BasicBlockPass((intptr_t)&ID), PassToPrint(PI) {}
@@ -172,7 +172,7 @@ struct BasicBlockPassPrinter : public BasicBlockPass {
}
};
-const int BasicBlockPassPrinter::ID = 0;
+const char BasicBlockPassPrinter::ID = 0;
inline void addPass(PassManager &PM, Pass *P) {
// Add the pass to the pass manager...
PM.add(P);