[llvm-commits] CVS: llvm/tools/bugpoint/ExtractFunction.cpp TestPasses.cpp
Devang Patel
dpatel at apple.com
Wed May 2 14:41:24 PDT 2007
Changes in directory llvm/tools/bugpoint:
ExtractFunction.cpp updated: 1.59 -> 1.60
TestPasses.cpp updated: 1.11 -> 1.12
---
Log message:
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.
---
Diffs of the changes: (+6 -6)
ExtractFunction.cpp | 4 ++--
TestPasses.cpp | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
Index: llvm/tools/bugpoint/ExtractFunction.cpp
diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.59 llvm/tools/bugpoint/ExtractFunction.cpp:1.60
--- llvm/tools/bugpoint/ExtractFunction.cpp:1.59 Tue May 1 16:15:47 2007
+++ llvm/tools/bugpoint/ExtractFunction.cpp Wed May 2 16:39:20 2007
@@ -306,10 +306,10 @@
class BlockExtractorPass : public ModulePass {
bool runOnModule(Module &M);
public:
- static const int ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
BlockExtractorPass() : ModulePass((intptr_t)&ID) {}
};
- const int BlockExtractorPass::ID = 0;
+ const char BlockExtractorPass::ID = 0;
RegisterPass<BlockExtractorPass>
XX("extract-bbs", "Extract Basic Blocks From Module (for bugpoint use)");
}
Index: llvm/tools/bugpoint/TestPasses.cpp
diff -u llvm/tools/bugpoint/TestPasses.cpp:1.11 llvm/tools/bugpoint/TestPasses.cpp:1.12
--- llvm/tools/bugpoint/TestPasses.cpp:1.11 Tue May 1 16:15:47 2007
+++ llvm/tools/bugpoint/TestPasses.cpp Wed May 2 16:39:20 2007
@@ -26,7 +26,7 @@
/// crashes on any call instructions.
class CrashOnCalls : public BasicBlockPass {
public:
- static const int ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
CrashOnCalls() : BasicBlockPass((intptr_t)&ID) {}
private:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -42,7 +42,7 @@
}
};
- const int CrashOnCalls::ID = 0;
+ const char CrashOnCalls::ID = 0;
RegisterPass<CrashOnCalls>
X("bugpoint-crashcalls",
"BugPoint Test Pass - Intentionally crash on CallInsts");
@@ -53,7 +53,7 @@
/// deletes some call instructions, "misoptimizing" the program.
class DeleteCalls : public BasicBlockPass {
public:
- static const int ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
DeleteCalls() : BasicBlockPass((intptr_t)&ID) {}
private:
bool runOnBasicBlock(BasicBlock &BB) {
@@ -68,7 +68,7 @@
}
};
- const int DeleteCalls::ID = 0;
+ const char DeleteCalls::ID = 0;
RegisterPass<DeleteCalls>
Y("bugpoint-deletecalls",
"BugPoint Test Pass - Intentionally 'misoptimize' CallInsts");
More information about the llvm-commits
mailing list