Use the correct prototype for malloc and free
authorChris Lattner <sabre@nondot.org>
Wed, 31 Oct 2001 06:36:23 +0000 (06:36 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 31 Oct 2001 06:36:23 +0000 (06:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1066 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/LowerAllocations.cpp

index 945d941530cb63e76b6b2810fe92ba5fa70f84e9..91f45d8206957138883b5ae1353f9b3735b463a5 100644 (file)
@@ -22,7 +22,7 @@
 bool LowerAllocations::doPassInitialization(Module *M) {
   bool Changed = false;
   const MethodType *MallocType = 
-    MethodType::get(PointerType::get(Type::UByteTy),
+    MethodType::get(PointerType::get(Type::SByteTy),
                     vector<const Type*>(1, Type::UIntTy), false);
 
   SymbolTable *SymTab = M->getSymbolTableSure();
@@ -37,7 +37,7 @@ bool LowerAllocations::doPassInitialization(Module *M) {
 
   const MethodType *FreeType = 
     MethodType::get(Type::VoidTy,
-                    vector<const Type*>(1, PointerType::get(Type::UByteTy)),
+                    vector<const Type*>(1, PointerType::get(Type::SByteTy)),
                    false);
 
   // Check for a definition of free