[PATCH] D104514: Allow building for release with EXPENSIVE_CHECKS
Tomas Matheson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 18 03:03:27 PDT 2021
tmatheson created this revision.
tmatheson added reviewers: aeubanks, thakis.
Herald added a subscriber: hiraditya.
tmatheson requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
D97225 <https://reviews.llvm.org/D97225> moved LazyCallGraph verify() calls behind EXPENSIVE_CHECKS,
but verity() is defined for debug builds only so this had the unintended
effect of breaking release builds with EXPENSIVE_CHECKS.
Fix by enabling verify() for both debug and EXPENSIVE_CHECKS.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D104514
Files:
llvm/include/llvm/Analysis/LazyCallGraph.h
llvm/lib/Analysis/LazyCallGraph.cpp
Index: llvm/lib/Analysis/LazyCallGraph.cpp
===================================================================
--- llvm/lib/Analysis/LazyCallGraph.cpp
+++ llvm/lib/Analysis/LazyCallGraph.cpp
@@ -241,7 +241,7 @@
}
#endif
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(EXPENSIVE_CHECKS)
void LazyCallGraph::SCC::verify() {
assert(OuterRefSCC && "Can't have a null RefSCC!");
assert(!Nodes.empty() && "Can't have an empty SCC!");
@@ -333,7 +333,7 @@
}
#endif
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(EXPENSIVE_CHECKS)
void LazyCallGraph::RefSCC::verify() {
assert(G && "Can't have a null graph!");
assert(!SCCs.empty() && "Can't have an empty SCC!");
Index: llvm/include/llvm/Analysis/LazyCallGraph.h
===================================================================
--- llvm/include/llvm/Analysis/LazyCallGraph.h
+++ llvm/include/llvm/Analysis/LazyCallGraph.h
@@ -463,7 +463,7 @@
/// Dump a short description of this SCC to stderr.
void dump() const;
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(EXPENSIVE_CHECKS)
/// Verify invariants about the SCC.
///
/// This will attempt to validate all of the basic invariants within an
@@ -584,7 +584,7 @@
/// Dump a short description of this RefSCC to stderr.
void dump() const;
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(EXPENSIVE_CHECKS)
/// Verify invariants about the RefSCC and all its SCCs.
///
/// This will attempt to validate all of the invariants *within* the
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104514.352956.patch
Type: text/x-patch
Size: 1508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210618/631622b9/attachment.bin>
More information about the llvm-commits
mailing list