summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/RaiseAllocations.cpp
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2005-04-21 23:48:37 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2005-04-21 23:48:37 +0000
commitfd93908ae8b9684fe71c239e3c6cfe13ff6a2663 (patch)
tree4d0726d997a629d08765d11a705a42c4f48690af /lib/Transforms/IPO/RaiseAllocations.cpp
parent0e0a7a45d3d0a8c865a078459d2e1c6d8967a100 (diff)
downloadllvm-fd93908ae8b9684fe71c239e3c6cfe13ff6a2663.tar.gz
llvm-fd93908ae8b9684fe71c239e3c6cfe13ff6a2663.tar.bz2
llvm-fd93908ae8b9684fe71c239e3c6cfe13ff6a2663.tar.xz
Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/RaiseAllocations.cpp')
-rw-r--r--lib/Transforms/IPO/RaiseAllocations.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Transforms/IPO/RaiseAllocations.cpp b/lib/Transforms/IPO/RaiseAllocations.cpp
index 8a35bc39e6..2b487d009d 100644
--- a/lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/lib/Transforms/IPO/RaiseAllocations.cpp
@@ -1,10 +1,10 @@
//===- RaiseAllocations.cpp - Convert %malloc & %free calls to insts ------===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This file defines the RaiseAllocations pass which convert malloc and free
@@ -33,17 +33,17 @@ namespace {
Function *FreeFunc; // Initialized by doPassInitializationVirt
public:
RaiseAllocations() : MallocFunc(0), FreeFunc(0) {}
-
+
// doPassInitialization - For the raise allocations pass, this finds a
// declaration for malloc and free if they exist.
//
void doInitialization(Module &M);
-
+
// run - This method does the actual work of converting instructions over.
//
bool runOnModule(Module &M);
};
-
+
RegisterOpt<RaiseAllocations>
X("raiseallocs", "Raise allocations from calls to instructions");
} // end anonymous namespace
@@ -134,14 +134,14 @@ bool RaiseAllocations::runOnModule(Module &M) {
(CS.getCalledFunction() == MallocFunc ||
std::find(EqPointers.begin(), EqPointers.end(),
CS.getCalledValue()) != EqPointers.end())) {
-
+
Value *Source = *CS.arg_begin();
-
+
// If no prototype was provided for malloc, we may need to cast the
// source size.
if (Source->getType() != Type::UIntTy)
Source = new CastInst(Source, Type::UIntTy, "MallocAmtCast", I);
-
+
std::string Name(I->getName()); I->setName("");
MallocInst *MI = new MallocInst(Type::SByteTy, Source, Name, I);
I->replaceAllUsesWith(MI);
@@ -183,7 +183,7 @@ bool RaiseAllocations::runOnModule(Module &M) {
(CS.getCalledFunction() == FreeFunc ||
std::find(EqPointers.begin(), EqPointers.end(),
CS.getCalledValue()) != EqPointers.end())) {
-
+
// If no prototype was provided for free, we may need to cast the
// source pointer. This should be really uncommon, but it's necessary
// just in case we are dealing with weird code like this: