[PATCH] D56297: [DWARFUnit] Don't assume basic types.

Andrew Kelley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 4 13:00:26 PST 2019


andrewrk added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:472
+  if (!BTy)
+    return false;
   unsigned Encoding = BTy->getEncoding();
----------------
davide wrote:
> aprantl wrote:
> > Why is false the right answer here?
> To be quite honest, I think it's irrelevant (in the sense that it doesn't matter what we return here).
It seems to me that the question "is a subroutine an unsigned type" is a nonsensical question, and should be an assertion error (as it is in status quo trunk).

Or otherwise if a subroutine can be treated implicitly as a pointer, then it should have the same answer that a pointer would have, which is `true`.


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

https://reviews.llvm.org/D56297





More information about the llvm-commits mailing list