summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-05-20 20:18:16 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-05-20 20:18:16 +0000
commit92a699c50e0a3d7627634af5a2a850a4b82ac21b (patch)
treec79560ec07d0af93bfb5cc997a678a40b205cbc1 /llvm/lib/Target
parenta74480d1eb726cac1372f995e7b96dac899cf5da (diff)
downloadbcm5719-llvm-92a699c50e0a3d7627634af5a2a850a4b82ac21b.tar.gz
bcm5719-llvm-92a699c50e0a3d7627634af5a2a850a4b82ac21b.zip
MC: Remove most remaining uses of MCSymbolData::getSymbol(), NFC
Remove most remaining calls to `MCSymbolData::getSymbol()`, instead using the already available `MCSymbol` directly. llvm-svn: 237829
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
index 70721e945fc..cd175ad37ee 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
@@ -295,7 +295,6 @@ void AArch64MachObjectWriter::RecordRelocation(
Asm.addLocalUsedInReloc(*Symbol);
}
- const MCSymbolData &SD = Asm.getSymbolData(*Symbol);
const MCSymbol *Base = Asm.getAtom(*Symbol);
// If the symbol is a variable and we weren't able to get a Base for it
@@ -305,7 +304,7 @@ void AArch64MachObjectWriter::RecordRelocation(
// If the evaluation is an absolute value, just use that directly
// to keep things easy.
int64_t Res;
- if (SD.getSymbol().getVariableValue()->EvaluateAsAbsolute(
+ if (Symbol->getVariableValue()->EvaluateAsAbsolute(
Res, Layout, Writer->getSectionAddressMap())) {
FixedValue = Res;
return;
@@ -350,19 +349,18 @@ void AArch64MachObjectWriter::RecordRelocation(
"'. Must have non-local symbol earlier in section.");
// Adjust the relocation to be section-relative.
// The index is the section ordinal (1-based).
- const MCSectionData &SymSD =
- Asm.getSectionData(SD.getSymbol().getSection());
+ const MCSectionData &SymSD = Asm.getSectionData(Symbol->getSection());
Index = SymSD.getOrdinal() + 1;
- Value += Writer->getSymbolAddress(SD.getSymbol(), Layout);
+ Value += Writer->getSymbolAddress(*Symbol, Layout);
if (IsPCRel)
Value -= Writer->getFragmentAddress(Fragment, Layout) +
Fixup.getOffset() + (1ULL << Log2Size);
} else {
// Resolve constant variables.
- if (SD.getSymbol().isVariable()) {
+ if (Symbol->isVariable()) {
int64_t Res;
- if (SD.getSymbol().getVariableValue()->EvaluateAsAbsolute(
+ if (Symbol->getVariableValue()->EvaluateAsAbsolute(
Res, Layout, Writer->getSectionAddressMap())) {
FixedValue = Res;
return;
OpenPOWER on IntegriCloud