[PATCH] D28358: [globalisel] Stop requiring -debug/-debug-only=registerbankinfo for assertions.

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 09:48:09 PST 2017


qcolombet accepted this revision.
qcolombet added a comment.
This revision is now accepted and ready to land.

Hi Daniel,

Good catch!

LGTM. Nitpicks below.

Cheers,
-Quentin



================
Comment at: lib/CodeGen/GlobalISel/RegisterBankInfo.cpp:58
     : RegBanks(RegBanks), NumRegBanks(NumRegBanks) {
-  DEBUG(for (unsigned Idx = 0, End = getNumRegBanks(); Idx != End; ++Idx) {
+#ifdef NDEBUG
+  for (unsigned Idx = 0, End = getNumRegBanks(); Idx != End; ++Idx) {
----------------
#ifndef NDEBUG, right?


================
Comment at: lib/CodeGen/GlobalISel/RegisterBankInfo.cpp:75
 bool RegisterBankInfo::verify(const TargetRegisterInfo &TRI) const {
-  DEBUG(for (unsigned Idx = 0, End = getNumRegBanks(); Idx != End; ++Idx) {
+#ifdef NDEBUG
+  for (unsigned Idx = 0, End = getNumRegBanks(); Idx != End; ++Idx) {
----------------
Ditto.


https://reviews.llvm.org/D28358





More information about the llvm-commits mailing list