[LLVMbugs] [Bug 1013] Invalid assembly generated with DWARF2 and Obj-C GC
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Nov 20 12:30:07 PST 2006
http://llvm.org/bugs/show_bug.cgi?id=1013
jlaskey at apple.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From jlaskey at apple.com 2006-11-20 14:30 -------
Index: lib/CodeGen/AsmPrinter.cpp
===============================================================
====
RCS file: /var/cvs/llvm/llvm/lib/CodeGen/AsmPrinter.cpp,v
retrieving revision 1.116
diff -u -1 -0 -d -r1.116 AsmPrinter.cpp
--- lib/CodeGen/AsmPrinter.cpp 1 Nov 2006 09:23:08 -0000
1.116
+++ lib/CodeGen/AsmPrinter.cpp 20 Nov 2006 20:28:17 -0000
@@ -327,23 +327,31 @@
// Emit the function pointer.
EmitGlobalConstant(CS->getOperand(1));
}
}
/// getGlobalLinkName - Returns the asm/link name of of the specified
/// global variable. Should be overridden by each target asm printer to
/// generate the appropriate value.
const std::string AsmPrinter::getGlobalLinkName(const GlobalVariable *GV) const{
std::string LinkName;
- // Default action is to use a global symbol.
- LinkName = TAI->getGlobalPrefix();
- LinkName += GV->getName();
+
+ if (isa<Function>(GV)) {
+ LinkName += TAI->getFunctionAddrPrefix();
+ LinkName += Mang->getValueName(GV);
+ LinkName += TAI->getFunctionAddrSuffix();
+ } else {
+ LinkName += TAI->getGlobalVarAddrPrefix();
+ LinkName += Mang->getValueName(GV);
+ LinkName += TAI->getGlobalVarAddrSuffix();
+ }
+
return LinkName;
}
// EmitAlignment - Emit an alignment directive to the specified power of two.
void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV) const {
if (GV && GV->getAlignment())
NumBits = Log2_32(GV->getAlignment());
if (NumBits == 0) return; // No need to emit alignment.
if (TAI->getAlignmentIsInBytes()) NumBits = 1 << NumBits;
O << TAI->getAlignDirective() << NumBits << "\n";
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list