aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Utils/InstructionNamer.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-08-13 21:58:54 +0000
committerOwen Anderson <resistor@mac.com>2009-08-13 21:58:54 +0000
commit35b4707edb32008b1a7976dcbf3920b1160fc1c6 (patch)
tree2cdabe223bfce83bd12e10dd557147a2f68c9bf8 /lib/Transforms/Utils/InstructionNamer.cpp
parentdfa78d19236fe2c33733c916f45d25ba46e0773f (diff)
downloadexternal_llvm-35b4707edb32008b1a7976dcbf3920b1160fc1c6.zip
external_llvm-35b4707edb32008b1a7976dcbf3920b1160fc1c6.tar.gz
external_llvm-35b4707edb32008b1a7976dcbf3920b1160fc1c6.tar.bz2
Push LLVMContexts through the IntegerType APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/InstructionNamer.cpp')
-rw-r--r--lib/Transforms/Utils/InstructionNamer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/InstructionNamer.cpp b/lib/Transforms/Utils/InstructionNamer.cpp
index 4f8a160..1fa51a3 100644
--- a/lib/Transforms/Utils/InstructionNamer.cpp
+++ b/lib/Transforms/Utils/InstructionNamer.cpp
@@ -32,7 +32,7 @@ namespace {
bool runOnFunction(Function &F) {
for (Function::arg_iterator AI = F.arg_begin(), AE = F.arg_end();
AI != AE; ++AI)
- if (!AI->hasName() && AI->getType() != Type::VoidTy)
+ if (!AI->hasName() && AI->getType() != Type::getVoidTy(F.getContext()))
AI->setName("tmp");
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
@@ -40,7 +40,7 @@ namespace {
BB->setName("BB");
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)
- if (!I->hasName() && I->getType() != Type::VoidTy)
+ if (!I->hasName() && I->getType() != Type::getVoidTy(F.getContext()))
I->setName("tmp");
}
return true;