rsundahl added inline comments.

================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1205
     unsigned Priority, const MCSymbol *KeySym) const {
-  // TODO(yln): Remove -lower-global-dtors-via-cxa-atexit fallback flag
-  // (LowerGlobalDtorsViaCxaAtExit) and always issue a fatal error here.
-  if (TM->Options.LowerGlobalDtorsViaCxaAtExit)
-    report_fatal_error("@llvm.global_dtors should have been lowered already");
-  return StaticDtorSection;
+  report_fatal_error("@llvm.global_dtors should have been lowered already");
 }
----------------
So the new assertion will be that it's a fatal error to get here at all. 
Currently, it's a fatal error only if you get here with the flag set. Are we 
sure that someone isn't getting here w/o the flag set and so they don't get an 
error but now will? Provided we don't mind surfacing any users of the flag with 
an explicit fatal error, then this LGTM.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145715

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to