mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-15 07:59:57 +00:00
* 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
This commit is contained in:
parent
01d1ee3a4c
commit
594b9fadb8
@ -356,7 +356,7 @@ void CWriter::writeOperand(const Value *Operand) {
|
|||||||
void CWriter::printModule(Module *M) {
|
void CWriter::printModule(Module *M) {
|
||||||
// Calculate which global values have names that will collide when we throw
|
// Calculate which global values have names that will collide when we throw
|
||||||
// away type information.
|
// 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;
|
std::set<string> FoundNames;
|
||||||
for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
|
for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
|
||||||
if ((*I)->hasName()) // If the global has a name...
|
if ((*I)->hasName()) // If the global has a name...
|
||||||
@ -379,6 +379,7 @@ void CWriter::printModule(Module *M) {
|
|||||||
|
|
||||||
// get declaration for alloca
|
// get declaration for alloca
|
||||||
Out << "/* Provide Declarations */\n"
|
Out << "/* Provide Declarations */\n"
|
||||||
|
<< "#include <malloc.h>\n"
|
||||||
<< "#include <alloca.h>\n\n"
|
<< "#include <alloca.h>\n\n"
|
||||||
|
|
||||||
// Provide a definition for null if one does not already exist.
|
// Provide a definition for null if one does not already exist.
|
||||||
|
@ -356,7 +356,7 @@ void CWriter::writeOperand(const Value *Operand) {
|
|||||||
void CWriter::printModule(Module *M) {
|
void CWriter::printModule(Module *M) {
|
||||||
// Calculate which global values have names that will collide when we throw
|
// Calculate which global values have names that will collide when we throw
|
||||||
// away type information.
|
// 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;
|
std::set<string> FoundNames;
|
||||||
for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
|
for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
|
||||||
if ((*I)->hasName()) // If the global has a name...
|
if ((*I)->hasName()) // If the global has a name...
|
||||||
@ -379,6 +379,7 @@ void CWriter::printModule(Module *M) {
|
|||||||
|
|
||||||
// get declaration for alloca
|
// get declaration for alloca
|
||||||
Out << "/* Provide Declarations */\n"
|
Out << "/* Provide Declarations */\n"
|
||||||
|
<< "#include <malloc.h>\n"
|
||||||
<< "#include <alloca.h>\n\n"
|
<< "#include <alloca.h>\n\n"
|
||||||
|
|
||||||
// Provide a definition for null if one does not already exist.
|
// Provide a definition for null if one does not already exist.
|
||||||
|
Loading…
Reference in New Issue
Block a user