[llvm-commits] [llvm] r75106 - /llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Wed Jul 8 22:19:37 PDT 2009
Author: lattner
Date: Thu Jul 9 00:19:23 2009
New Revision: 75106
URL: http://llvm.org/viewvc/llvm-project?rev=75106&view=rev
Log:
pc-relative references are *always* to functions, never to globals. ISel
is incapable of lowering direct references to globals like this, zap the code.
Modified:
llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp?rev=75106&r1=75105&r2=75106&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp Thu Jul 9 00:19:23 2009
@@ -316,29 +316,16 @@
// non-lazily-resolved stubs
if (GV->isDeclaration() || GV->isWeakForLinker()) {
// Dynamically-resolved functions need a stub for the function.
- if (isa<Function>(GV)) {
- // Function stubs are no longer needed for Mac OS X 10.5 and up.
- if (Subtarget->isTargetDarwin() && Subtarget->getDarwinVers() >= 9) {
- O << Name;
- } else {
- FnStubs.insert(Name);
- printSuffixedName(Name, "$stub");
- }
- assert(MO.getTargetFlags() == 0);
- } else if (GV->hasHiddenVisibility()) {
- if (!GV->isDeclaration() && !GV->hasCommonLinkage())
- // Definition is not definitely in the current translation unit.
- O << Name;
- else {
- HiddenGVStubs.insert(Name);
- printSuffixedName(Name, "$non_lazy_ptr");
- assert(MO.getTargetFlags() == 0);
- }
+ assert(isa<Function>(GV));
+
+ // Function stubs are no longer needed for Mac OS X 10.5 and up.
+ if (Subtarget->isTargetDarwin() && Subtarget->getDarwinVers() >= 9) {
+ O << Name;
} else {
- GVStubs.insert(Name);
- printSuffixedName(Name, "$non_lazy_ptr");
- assert(MO.getTargetFlags() == 0);
+ FnStubs.insert(Name);
+ printSuffixedName(Name, "$stub");
}
+ assert(MO.getTargetFlags() == 0);
} else {
O << Name;
}
More information about the llvm-commits
mailing list