aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/LowerAllocations.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-07-23 18:06:30 +0000
committerChris Lattner <sabre@nondot.org>2002-07-23 18:06:30 +0000
commitaf41a12370010325eb163b734d5757a7f0296e67 (patch)
tree3cea3437396dc74b015542f4b632852e2fa23359 /lib/Transforms/Utils/LowerAllocations.cpp
parent11982667780c40f0640408e78da1ba06a35c183e (diff)
* Remove getPassName implementation
* Register all Passes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3015 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerAllocations.cpp')
-rw-r--r--lib/Transforms/Utils/LowerAllocations.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp
index 003be33182..a50cd8a5d1 100644
--- a/lib/Transforms/Utils/LowerAllocations.cpp
+++ b/lib/Transforms/Utils/LowerAllocations.cpp
@@ -31,12 +31,10 @@ class LowerAllocations : public BasicBlockPass {
const TargetData &DataLayout;
public:
- inline LowerAllocations(const TargetData &TD) : DataLayout(TD) {
+ LowerAllocations(const TargetData &TD) : DataLayout(TD) {
MallocFunc = FreeFunc = 0;
}
- const char *getPassName() const { return "Lower Allocations"; }
-
// doPassInitialization - For the lower allocations pass, this ensures that a
// module contains a declaration for a malloc and a free function.
//
@@ -47,7 +45,6 @@ public:
//
bool runOnBasicBlock(BasicBlock &BB);
};
-
}
// createLowerAllocationsPass - Interface to this file...
@@ -55,6 +52,10 @@ Pass *createLowerAllocationsPass(const TargetData &TD) {
return new LowerAllocations(TD);
}
+static RegisterPass<LowerAllocations>
+X("lowerallocs", "Lower allocations from instructions to calls (TD)",
+ createLowerAllocationsPass);
+
// doInitialization - For the lower allocations pass, this ensures that a
// module contains a declaration for a malloc and a free function.