mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 23:24:34 +00:00
Revert r52046. It broke cbe on x86 / Mac OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52071 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1224,10 +1224,6 @@ std::string CWriter::GetValueName(const Value *Operand) {
|
|||||||
Name = "llvm_cbe_" + VarName;
|
Name = "llvm_cbe_" + VarName;
|
||||||
} else {
|
} else {
|
||||||
Name = Mang->getValueName(Operand);
|
Name = Mang->getValueName(Operand);
|
||||||
|
|
||||||
// Check, if operand has assembler identifier and handle it separately
|
|
||||||
if (Operand->getNameStart()[0] == 1)
|
|
||||||
Name = "llvm_cbe_asmname_" + Name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Name;
|
return Name;
|
||||||
@ -1656,11 +1652,6 @@ bool CWriter::doInitialization(Module &M) {
|
|||||||
|
|
||||||
if (I->hasExternalWeakLinkage())
|
if (I->hasExternalWeakLinkage())
|
||||||
Out << " __EXTERNAL_WEAK__";
|
Out << " __EXTERNAL_WEAK__";
|
||||||
|
|
||||||
// Special handling for assembler identifiers
|
|
||||||
if (I->getNameStart()[0] == 1)
|
|
||||||
Out << " LLVM_ASM(\"" << I->getName().c_str()+1 << "\")";
|
|
||||||
|
|
||||||
Out << ";\n";
|
Out << ";\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1670,7 +1661,7 @@ bool CWriter::doInitialization(Module &M) {
|
|||||||
Out << "double fmod(double, double);\n"; // Support for FP rem
|
Out << "double fmod(double, double);\n"; // Support for FP rem
|
||||||
Out << "float fmodf(float, float);\n";
|
Out << "float fmodf(float, float);\n";
|
||||||
Out << "long double fmodl(long double, long double);\n";
|
Out << "long double fmodl(long double, long double);\n";
|
||||||
|
|
||||||
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
|
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
|
||||||
// Don't print declarations for intrinsic functions.
|
// Don't print declarations for intrinsic functions.
|
||||||
if (!I->isIntrinsic() && I->getName() != "setjmp" &&
|
if (!I->isIntrinsic() && I->getName() != "setjmp" &&
|
||||||
@ -1678,7 +1669,7 @@ bool CWriter::doInitialization(Module &M) {
|
|||||||
if (I->hasExternalWeakLinkage())
|
if (I->hasExternalWeakLinkage())
|
||||||
Out << "extern ";
|
Out << "extern ";
|
||||||
printFunctionSignature(I, true);
|
printFunctionSignature(I, true);
|
||||||
if (I->hasWeakLinkage() || I->hasLinkOnceLinkage())
|
if (I->hasWeakLinkage() || I->hasLinkOnceLinkage())
|
||||||
Out << " __ATTRIBUTE_WEAK__";
|
Out << " __ATTRIBUTE_WEAK__";
|
||||||
if (I->hasExternalWeakLinkage())
|
if (I->hasExternalWeakLinkage())
|
||||||
Out << " __EXTERNAL_WEAK__";
|
Out << " __EXTERNAL_WEAK__";
|
||||||
@ -1688,11 +1679,10 @@ bool CWriter::doInitialization(Module &M) {
|
|||||||
Out << " __ATTRIBUTE_DTOR__";
|
Out << " __ATTRIBUTE_DTOR__";
|
||||||
if (I->hasHiddenVisibility())
|
if (I->hasHiddenVisibility())
|
||||||
Out << " __HIDDEN__";
|
Out << " __HIDDEN__";
|
||||||
|
|
||||||
// Special handling for assembler identifiers
|
if (I->hasName() && I->getName()[0] == 1)
|
||||||
if (I->getNameStart()[0] == 1)
|
|
||||||
Out << " LLVM_ASM(\"" << I->getName().c_str()+1 << "\")";
|
Out << " LLVM_ASM(\"" << I->getName().c_str()+1 << "\")";
|
||||||
|
|
||||||
Out << ";\n";
|
Out << ";\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1729,11 +1719,6 @@ bool CWriter::doInitialization(Module &M) {
|
|||||||
Out << " __EXTERNAL_WEAK__";
|
Out << " __EXTERNAL_WEAK__";
|
||||||
if (I->hasHiddenVisibility())
|
if (I->hasHiddenVisibility())
|
||||||
Out << " __HIDDEN__";
|
Out << " __HIDDEN__";
|
||||||
|
|
||||||
// Special handling for assembler identifiers
|
|
||||||
if (I->getNameStart()[0] == 1)
|
|
||||||
Out << " LLVM_ASM(\"" << I->getName().c_str()+1 << "\")";
|
|
||||||
|
|
||||||
Out << ";\n";
|
Out << ";\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1741,7 +1726,7 @@ bool CWriter::doInitialization(Module &M) {
|
|||||||
// Output the global variable definitions and contents...
|
// Output the global variable definitions and contents...
|
||||||
if (!M.global_empty()) {
|
if (!M.global_empty()) {
|
||||||
Out << "\n\n/* Global Variable Definitions and Initialization */\n";
|
Out << "\n\n/* Global Variable Definitions and Initialization */\n";
|
||||||
for (Module::global_iterator I = M.global_begin(), E = M.global_end();
|
for (Module::global_iterator I = M.global_begin(), E = M.global_end();
|
||||||
I != E; ++I)
|
I != E; ++I)
|
||||||
if (!I->isDeclaration()) {
|
if (!I->isDeclaration()) {
|
||||||
// Ignore special globals, such as debug info.
|
// Ignore special globals, such as debug info.
|
||||||
|
Reference in New Issue
Block a user