MC: Use MCSymbol in RelAndSymbol, NFC
[oota-llvm.git] / lib / Target / PowerPC / MCTargetDesc / PPCMachObjectWriter.cpp
index 44e69b7565d1c02c7b0f960c31b3a84b182cbe10..c1bb9abd33cdd5b9f425745fb98f8f1b5038377c 100644 (file)
@@ -333,7 +333,7 @@ void PPCMachObjectWriter::RecordPPCRelocation(
   unsigned Index = 0;
   unsigned Type = RelocType;
 
-  const MCSymbolData *RelSymbol = nullptr;
+  const MCSymbol *RelSymbol = nullptr;
   if (Target.isAbsolute()) { // constant
                              // SymbolNum of 0 indicates the absolute section.
                              //
@@ -355,7 +355,7 @@ void PPCMachObjectWriter::RecordPPCRelocation(
 
     // Check whether we need an external or internal relocation.
     if (Writer->doesSymbolRequireExternRelocation(SD)) {
-      RelSymbol = SD;
+      RelSymbol = &SD->getSymbol();
       // For external relocations, make sure to offset the fixup value to
       // compensate for the addend of the symbol address, if it was
       // undefined. This occurs with weak definitions, for example.