diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-29 18:48:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-29 18:48:30 +0000 |
commit | 72a1d4e12657620ea1dd5a2fdb7570da81f5079c (patch) | |
tree | 6ef131957c8c3a5ccb001f4d4f59d30f3b254535 /lib/Transforms/Utils/PromoteMemoryToRegister.cpp | |
parent | 3eb59c0074978cb4687779365dbe664e2e18e0b2 (diff) |
changes because iMemory.h no longer #includes DerivedTypes.h
This only requires Type.h anyway
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2405 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/PromoteMemoryToRegister.cpp')
-rw-r--r-- | lib/Transforms/Utils/PromoteMemoryToRegister.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index cfaeeccdf6..ee8300215f 100644 --- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -25,6 +25,7 @@ #include "llvm/Function.h" #include "llvm/BasicBlock.h" #include "llvm/Constant.h" +#include "llvm/Type.h" using std::vector; using std::map; @@ -165,7 +166,7 @@ bool PromotePass::runOnFunction(Function *F) { // vector<Value *> Values(Allocas.size()); for (unsigned i = 0, e = Allocas.size(); i != e; ++i) - Values[i] = Constant::getNullValue(Allocas[i]->getType()->getElementType()); + Values[i] = Constant::getNullValue(Allocas[i]->getAllocatedType()); // Walks all basic blocks in the function performing the SSA rename algorithm // and inserting the phi nodes we marked as necessary @@ -204,7 +205,7 @@ bool PromotePass::QueuePhiNode(BasicBlock *BB, unsigned AllocaNo) { if (BBPNs[AllocaNo]) return false; // Create a PhiNode using the dereferenced type... - PHINode *PN = new PHINode(Allocas[AllocaNo]->getType()->getElementType(), + PHINode *PN = new PHINode(Allocas[AllocaNo]->getAllocatedType(), Allocas[AllocaNo]->getName()+".mem2reg"); BBPNs[AllocaNo] = PN; |