Removed size_t from the parameter list of the malloc() prototype in generated C
authorJohn Criswell <criswell@uiuc.edu>
Tue, 8 Jul 2003 14:52:09 +0000 (14:52 +0000)
committerJohn Criswell <criswell@uiuc.edu>
Tue, 8 Jul 2003 14:52:09 +0000 (14:52 +0000)
code.  This prevents a compiler warning on Sparc that causes the tests to fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7125 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index d38c6c7e5ea60efcbd3e6e3015a82f269c3fc1c9..71e0c3c9fb4663a63a3b3b53dace36a880310cc2 100644 (file)
@@ -676,7 +676,7 @@ void CWriter::printModule(Module *M) {
   // Print Malloc prototype if needed
   if (needsMalloc){
     Out << "\n/* Malloc to make sun happy */\n";
-    Out << "extern void * malloc(size_t);\n\n";
+    Out << "extern void * malloc();\n\n";
   }
 
   // Output the global variable declarations
index d38c6c7e5ea60efcbd3e6e3015a82f269c3fc1c9..71e0c3c9fb4663a63a3b3b53dace36a880310cc2 100644 (file)
@@ -676,7 +676,7 @@ void CWriter::printModule(Module *M) {
   // Print Malloc prototype if needed
   if (needsMalloc){
     Out << "\n/* Malloc to make sun happy */\n";
-    Out << "extern void * malloc(size_t);\n\n";
+    Out << "extern void * malloc();\n\n";
   }
 
   // Output the global variable declarations