[PATCH] D87008: [DebugInfo] Fix methods of AsmPrinter to emit values corresponding to the DWARF format (1/19).

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 19:08:04 PDT 2020


dblaikie accepted this revision.
dblaikie added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/unittests/CodeGen/AsmPrinterDwarfTest.cpp:34
+    setupTestPrinter(TripleStr, DwarfVersion, DwarfFormat);
+    return static_cast<bool>(TestPrinter);
+  }
----------------
Maybe nicer to write this as "return TestPrinter != nullptr;" ? (if you've got to write it out verbosely anyway due to the explicit conversion)


================
Comment at: llvm/unittests/CodeGen/AsmPrinterDwarfTest.cpp:153
+  ASSERT_TRUE(ActualArg0 != nullptr);
+  EXPECT_EQ(&(ActualArg0->getSymbol()), Val.Symbol);
+}
----------------
Ekxtra parens look like they're unnecessary here?


================
Comment at: llvm/unittests/CodeGen/AsmPrinterDwarfTest.cpp:176
+  const MCSymbolRefExpr *ActualArg0 = dyn_cast_or_null<MCSymbolRefExpr>(Arg0);
+  ASSERT_TRUE(ActualArg0 != nullptr);
+  EXPECT_EQ(&(ActualArg0->getSymbol()), Val.Symbol);
----------------
Is there an assert non-null you could use more directly?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87008



More information about the llvm-commits mailing list