diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -1396,8 +1396,8 @@ bool isPPC64 = DL.getPointerSizeInBits() == 64; - PPCTargetStreamer &TS = - static_cast(*OutStreamer->getTargetStreamer()); + PPCTargetStreamer *TS = + static_cast(OutStreamer->getTargetStreamer()); if (!TOC.empty()) { const char *Name = isPPC64 ? ".toc" : ".got2"; @@ -1413,7 +1413,7 @@ OutStreamer->emitLabel(TOCEntryLabel); if (isPPC64) - TS.emitTCEntry(*TOCEntryTarget); + TS->emitTCEntry(*TOCEntryTarget); else OutStreamer->emitSymbolValue(TOCEntryTarget, 4); }