diff options
author | Jan Sjödin <jan_sjodin@yahoo.com> | 2011-03-11 19:37:02 +0000 |
---|---|---|
committer | Jan Sjödin <jan_sjodin@yahoo.com> | 2011-03-11 19:37:02 +0000 |
commit | e4f6d7461aea7308e85c219c1cea5bd6059d4841 (patch) | |
tree | 240eef309266aae40967a4ba898115e86288d267 /lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | |
parent | 950d3db5f478a84242a90cafce0d8dfc4f8b1152 (diff) |
Remove optimization emitting a reference insted of label difference, since it can create more relocations. Removed isBaseAddressKnownZero method, because it is no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp b/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp index 98a1bf2f1c..68e80e3983 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp @@ -191,13 +191,6 @@ void AsmPrinter::EmitSectionOffset(const MCSymbol *Label, assert((!Label->isInSection() || &Label->getSection() == &Section) && "Section offset using wrong section base for label"); - // If the section in question will end up with an address of 0 anyway, we can - // just emit an absolute reference to save a relocation. - if (Section.isBaseAddressKnownZero()) { - OutStreamer.EmitSymbolValue(Label, 4, 0/*AddrSpace*/); - return; - } - // Otherwise, emit it as a label difference from the start of the section. EmitLabelDifference(Label, SectionLabel, 4); } |