diff options
author | Chris Lattner <sabre@nondot.org> | 2002-05-21 21:10:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-05-21 21:10:04 +0000 |
commit | 594b9fadb8226433350fde19071c79dde9cede67 (patch) | |
tree | 5c39d4d403c10ef866d91ac8035bfb12dfc82ac7 /lib | |
parent | 01d1ee3a4c4153c80c3c415e4612db6c27e37acb (diff) | |
download | external_llvm-594b9fadb8226433350fde19071c79dde9cede67.zip external_llvm-594b9fadb8226433350fde19071c79dde9cede67.tar.gz external_llvm-594b9fadb8226433350fde19071c79dde9cede67.tar.bz2 |
* Fix typeo
* Provide a #include of <malloc.h> so that the sun C compiler does not
miscompile malloc function calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2702 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 3 | ||||
-rw-r--r-- | lib/Target/CBackend/Writer.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 3003a02..bdac6a1 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -356,7 +356,7 @@ void CWriter::writeOperand(const Value *Operand) { void CWriter::printModule(Module *M) { // Calculate which global values have names that will collide when we throw // away type information. - { // Scope to declare the FoundNames set when we are done with it... + { // Scope to delete the FoundNames set when we are done with it... std::set<string> FoundNames; for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) if ((*I)->hasName()) // If the global has a name... @@ -379,6 +379,7 @@ void CWriter::printModule(Module *M) { // get declaration for alloca Out << "/* Provide Declarations */\n" + << "#include <malloc.h>\n" << "#include <alloca.h>\n\n" // Provide a definition for null if one does not already exist. diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 3003a02..bdac6a1 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -356,7 +356,7 @@ void CWriter::writeOperand(const Value *Operand) { void CWriter::printModule(Module *M) { // Calculate which global values have names that will collide when we throw // away type information. - { // Scope to declare the FoundNames set when we are done with it... + { // Scope to delete the FoundNames set when we are done with it... std::set<string> FoundNames; for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) if ((*I)->hasName()) // If the global has a name... @@ -379,6 +379,7 @@ void CWriter::printModule(Module *M) { // get declaration for alloca Out << "/* Provide Declarations */\n" + << "#include <malloc.h>\n" << "#include <alloca.h>\n\n" // Provide a definition for null if one does not already exist. |