diff options
author | Chris Lattner <sabre@nondot.org> | 2002-05-07 18:12:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-05-07 18:12:18 +0000 |
commit | 497c60c0ed891f4a189287cf3c1ad44dfcfe3099 (patch) | |
tree | 3dff677ee113c9c19d87bf724f9e8c85b3e06d50 /lib/Transforms/Utils/LowerAllocations.cpp | |
parent | 6d7491c3cc1ce46f346767fabb39d5dcda4b22bb (diff) |
Reduce dependance on TransformInternals.h, instead using the TransformUtils library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerAllocations.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerAllocations.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index 07c034bad0..ff3c29f11a 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -8,13 +8,15 @@ //===----------------------------------------------------------------------===// #include "llvm/Transforms/ChangeAllocations.h" +#include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Module.h" #include "llvm/Function.h" #include "llvm/DerivedTypes.h" #include "llvm/iMemory.h" #include "llvm/iOther.h" +#include "llvm/Constants.h" #include "llvm/Pass.h" -#include "TransformInternals.h" +#include "llvm/Target/TargetData.h" using std::vector; namespace { @@ -102,7 +104,7 @@ bool LowerAllocations::runOnBasicBlock(BasicBlock *BB) { if (MallocInst *MI = dyn_cast<MallocInst>(*(BBIL.begin()+i))) { BBIL.remove(BBIL.begin()+i); // remove the malloc instr... - const Type *AllocTy =cast<PointerType>(MI->getType())->getElementType(); + const Type *AllocTy = cast<PointerType>(MI->getType())->getElementType(); // Get the number of bytes to be allocated for one element of the // requested type... |