[PATCH] D100776: [clang/Basic] Make TargetInfo.h not use DataLayout again

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 20 18:53:02 PDT 2021


thakis added a comment.

> This keeps the assert that checks that the llvm DataLayout and the user label prefix are in sync. See the NDEBUG in Mangle.cpp here-ish: https://reviews.llvm.org/D100776#change-NN4Lz7xH29fo (I measured that that assert doesn't slow down `check-clang` in a release+assert build too). So I don't think this regresses safety.

It also keeps the easier-to-use resetDataLayout() API and sets the user label prefix as a 2nd (optional) arg in that function. That makes it harder to get them out of sync. And if you do get them out of sync, the assert will catch it as long as there's any test at all for that target. And if there isn't, you kind of have bigger problems :)


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

https://reviews.llvm.org/D100776



More information about the cfe-commits mailing list