Fix long standing bug
llvm-svn: 6232
diff --git a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp b/llvm/lib/Transforms/Scalar/LowerAllocations.cpp
index 68fb74e..c5014b4 100644
--- a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerAllocations.cpp
@@ -117,7 +117,7 @@
} else if (FreeInst *FI = dyn_cast<FreeInst>(I)) {
// Cast the argument to free into a ubyte*...
CastInst *MCast = new CastInst(FI->getOperand(0),
- PointerType::get(Type::UByteTy), "", I);
+ PointerType::get(Type::SByteTy), "", I);
// Insert a call to the free function...
CallInst *FCall = new CallInst(FreeFunc, std::vector<Value*>(1, MCast),