[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
Nicholas Hildenbrandt
hldnbrnd at cs.uiuc.edu
Fri Oct 11 16:41:01 PDT 2002
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.62 -> 1.63
---
Log message:
Instead of adding stdlib we just prototype malloc correctly.
---
Diffs of the changes:
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.62 llvm/lib/CWriter/Writer.cpp:1.63
--- llvm/lib/CWriter/Writer.cpp:1.62 Fri Oct 11 13:41:44 2002
+++ llvm/lib/CWriter/Writer.cpp Fri Oct 11 16:40:44 2002
@@ -514,7 +514,7 @@
}
// printing stdlib inclusion
- Out << "#include <stdlib.h>\n";
+ //Out << "#include <stdlib.h>\n";
// get declaration for alloca
Out << "/* Provide Declarations */\n"
@@ -541,6 +541,8 @@
// Global variable declarations...
if (!M->gempty()) {
Out << "\n/* External Global Variable Declarations */\n";
+ // Needed for malloc to work on sun.
+ Out << "extern void * malloc(size_t);\n";
for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I) {
if (I->hasExternalLinkage()) {
Out << "extern ";
More information about the llvm-commits
mailing list