[PATCH] D152540: [MC][MachO]Do not emit DWARF for no-personality case

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 12 05:21:14 PDT 2023


oontvoo added inline comments.


================
Comment at: llvm/lib/MC/MCAsmBackend.cpp:125
+
+  assert(Sym->isMachO());
+  StringRef name = Sym->getName();
----------------
tschuett wrote:
> jyknight wrote:
> > tschuett wrote:
> > > Could you please turn the assert into an if-statement?
> > Can you please clarify the purpose of your request? Refer to previous discussion thread here as to why this was changed, and if you disagree, please explain why.
> In release mode, the assert cannot fire. It is useless. It only helps you during development.
This assert is mostly a smoke-check for (most likely) impossible scenario - supposed to help in development only. So I'd have thought an assert is appropriate. Besides, there are plenty of other places both in this file and this package that use 'assert'. I'm not sure how those are different from this instance.

But anyways, changed to llvm_unreachable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152540



More information about the llvm-commits mailing list