[PATCH] D74173: [dsymutil] Change a parameter from Triple to IsArch64Bit

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 7 03:14:51 PST 2020


avl added a comment.

Hi Fangrui, you are absolutely correct. This llvm::Triple looks redundant. I have to do this and other similar cleanups. I was thinking about following change:

  diff --git a/llvm/tools/dsymutil/DwarfStreamer.cpp b/llvm/tools/dsymutil/DwarfStreamer.cpp
  index de20d9a3478..a219a7542d2 100644
  --- a/llvm/tools/dsymutil/DwarfStreamer.cpp
  +++ b/llvm/tools/dsymutil/DwarfStreamer.cpp
  @@ -220,13 +220,13 @@ void DwarfStreamer::emitSectionContents(const object::ObjectFile &Obj,
   }
   
   /// Emit DIE containing warnings.
  -void DwarfStreamer::emitPaperTrailWarningsDie(const Triple &Triple, DIE &Die) {
  +void DwarfStreamer::emitPaperTrailWarningsDie(DIE &Die) {
     switchToDebugInfoSection(/* Version */ 2);
     auto &Asm = getAsmPrinter();
     Asm.emitInt32(11 + Die.getSize() - 4);
     Asm.emitInt16(2);
     Asm.emitInt32(0);
  -  Asm.emitInt8(Triple.isArch64Bit() ? 8 : 4);
  +  Asm.emitInt8(MOFI->getTargetTriple().isArch64Bit() ? 8 : 4);
     DebugInfoSectionSize += 11;
     emitDIE(Die);
   }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74173/new/

https://reviews.llvm.org/D74173





More information about the llvm-commits mailing list