summaryrefslogtreecommitdiff
path: root/tools/bugpoint/CrashDebugger.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-06-24 00:33:28 +0000
committerDevang Patel <dpatel@apple.com>2010-06-24 00:33:28 +0000
commite9916a302f1bacad234d7dafc1df3dc968a6ba0f (patch)
treefa1c0857309e99b16b5b5691b33bd69afbb5004f /tools/bugpoint/CrashDebugger.cpp
parent6539dc6e6cb247de6960b2b1b3b8b01badb90728 (diff)
downloadllvm-e9916a302f1bacad234d7dafc1df3dc968a6ba0f.tar.gz
llvm-e9916a302f1bacad234d7dafc1df3dc968a6ba0f.tar.bz2
llvm-e9916a302f1bacad234d7dafc1df3dc968a6ba0f.tar.xz
Use ValueMap instead of DenseMap.
The ValueMapper used by various cloning utility maps MDNodes also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106706 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/CrashDebugger.cpp')
-rw-r--r--tools/bugpoint/CrashDebugger.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp
index 67ceaa90e3..2d0631cdad 100644
--- a/tools/bugpoint/CrashDebugger.cpp
+++ b/tools/bugpoint/CrashDebugger.cpp
@@ -130,14 +130,14 @@ bool
ReduceCrashingGlobalVariables::TestGlobalVariables(
std::vector<GlobalVariable*> &GVs) {
// Clone the program to try hacking it apart...
- DenseMap<const Value*, Value*> ValueMap;
- Module *M = CloneModule(BD.getProgram(), ValueMap);
+ ValueMap<const Value*, Value*> VMap;
+ Module *M = CloneModule(BD.getProgram(), VMap);
// Convert list to set for fast lookup...
std::set<GlobalVariable*> GVSet;
for (unsigned i = 0, e = GVs.size(); i != e; ++i) {
- GlobalVariable* CMGV = cast<GlobalVariable>(ValueMap[GVs[i]]);
+ GlobalVariable* CMGV = cast<GlobalVariable>(VMap[GVs[i]]);
assert(CMGV && "Global Variable not in module?!");
GVSet.insert(CMGV);
}
@@ -204,13 +204,13 @@ bool ReduceCrashingFunctions::TestFuncs(std::vector<Function*> &Funcs) {
return false;
// Clone the program to try hacking it apart...
- DenseMap<const Value*, Value*> ValueMap;
- Module *M = CloneModule(BD.getProgram(), ValueMap);
+ ValueMap<const Value*, Value*> VMap;
+ Module *M = CloneModule(BD.getProgram(), VMap);
// Convert list to set for fast lookup...
std::set<Function*> Functions;
for (unsigned i = 0, e = Funcs.size(); i != e; ++i) {
- Function *CMF = cast<Function>(ValueMap[Funcs[i]]);
+ Function *CMF = cast<Function>(VMap[Funcs[i]]);
assert(CMF && "Function not in module?!");
assert(CMF->getFunctionType() == Funcs[i]->getFunctionType() && "wrong ty");
assert(CMF->getName() == Funcs[i]->getName() && "wrong name");
@@ -270,13 +270,13 @@ namespace {
bool ReduceCrashingBlocks::TestBlocks(std::vector<const BasicBlock*> &BBs) {
// Clone the program to try hacking it apart...
- DenseMap<const Value*, Value*> ValueMap;
- Module *M = CloneModule(BD.getProgram(), ValueMap);
+ ValueMap<const Value*, Value*> VMap;
+ Module *M = CloneModule(BD.getProgram(), VMap);
// Convert list to set for fast lookup...
SmallPtrSet<BasicBlock*, 8> Blocks;
for (unsigned i = 0, e = BBs.size(); i != e; ++i)
- Blocks.insert(cast<BasicBlock>(ValueMap[BBs[i]]));
+ Blocks.insert(cast<BasicBlock>(VMap[BBs[i]]));
outs() << "Checking for crash with only these blocks:";
unsigned NumPrint = Blocks.size();
@@ -371,14 +371,14 @@ namespace {
bool ReduceCrashingInstructions::TestInsts(std::vector<const Instruction*>
&Insts) {
// Clone the program to try hacking it apart...
- DenseMap<const Value*, Value*> ValueMap;
- Module *M = CloneModule(BD.getProgram(), ValueMap);
+ ValueMap<const Value*, Value*> VMap;
+ Module *M = CloneModule(BD.getProgram(), VMap);
// Convert list to set for fast lookup...
SmallPtrSet<Instruction*, 64> Instructions;
for (unsigned i = 0, e = Insts.size(); i != e; ++i) {
assert(!isa<TerminatorInst>(Insts[i]));
- Instructions.insert(cast<Instruction>(ValueMap[Insts[i]]));
+ Instructions.insert(cast<Instruction>(VMap[Insts[i]]));
}
outs() << "Checking for crash with only " << Instructions.size();