summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/WinCOFFObjectWriter.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-05-19 23:53:20 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-05-19 23:53:20 +0000
commit2a40483418370b97149ce9e87384cdd1d0b702ac (patch)
treea7a70ec4ed639b4ad6887534258249f101943f9c /llvm/lib/MC/WinCOFFObjectWriter.cpp
parentc6c660b3dd60784662879dc4e236fdf066e79d10 (diff)
downloadbcm5719-llvm-2a40483418370b97149ce9e87384cdd1d0b702ac.tar.gz
bcm5719-llvm-2a40483418370b97149ce9e87384cdd1d0b702ac.zip
MC: Use MCSymbol in MCAsmLayout::getSymbolOffset(), NFC
Continue to canonicalize on MCSymbol instead of MCSymbolData when both are needed. llvm-svn: 237749
Diffstat (limited to 'llvm/lib/MC/WinCOFFObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/WinCOFFObjectWriter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp
index 278329aed5f..6bf4a4d2136 100644
--- a/llvm/lib/MC/WinCOFFObjectWriter.cpp
+++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp
@@ -355,7 +355,7 @@ static uint64_t getSymbolValue(const MCSymbolData &Data,
return Data.getCommonSize();
uint64_t Res;
- if (!Layout.getSymbolOffset(&Data, Res))
+ if (!Layout.getSymbolOffset(Data.getSymbol(), Res))
return 0;
return Res;
@@ -724,13 +724,13 @@ void WinCOFFObjectWriter::RecordRelocation(
CrossSection = &Symbol.getSection() != &B->getSection();
// Offset of the symbol in the section
- int64_t OffsetOfB = Layout.getSymbolOffset(&B_SD);
+ int64_t OffsetOfB = Layout.getSymbolOffset(*B);
// In the case where we have SymbA and SymB, we just need to store the delta
// between the two symbols. Update FixedValue to account for the delta, and
// skip recording the relocation.
if (!CrossSection) {
- int64_t OffsetOfA = Layout.getSymbolOffset(&A_SD);
+ int64_t OffsetOfA = Layout.getSymbolOffset(A);
FixedValue = (OffsetOfA - OffsetOfB) + Target.getConstant();
return;
}
OpenPOWER on IntegriCloud