[llvm] a99f6d3 - [NFC] Fix "unused variable" warning

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 15 12:59:21 PDT 2021


Author: Vitaly Buka
Date: 2021-06-15T12:59:05-07:00
New Revision: a99f6d307119e3f6cee7c2f7ad731a95d320063c

URL: https://github.com/llvm/llvm-project/commit/a99f6d307119e3f6cee7c2f7ad731a95d320063c
DIFF: https://github.com/llvm/llvm-project/commit/a99f6d307119e3f6cee7c2f7ad731a95d320063c.diff

LOG: [NFC] Fix "unused variable" warning

Added: 
    

Modified: 
    llvm/include/llvm/Support/GenericDomTreeConstruction.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/GenericDomTreeConstruction.h b/llvm/include/llvm/Support/GenericDomTreeConstruction.h
index c476ccbfc763..d306ebe99bc1 100644
--- a/llvm/include/llvm/Support/GenericDomTreeConstruction.h
+++ b/llvm/include/llvm/Support/GenericDomTreeConstruction.h
@@ -852,7 +852,7 @@ struct SemiNCAInfo {
       TN->setIDom(NCD);
     }
 
-#ifdef LLVM_ENABLE_ABI_BREAKING_CHECKS
+#if defined(LLVM_ENABLE_ABI_BREAKING_CHECKS) && !defined(NDEBUG)
     for (const TreeNodePtr TN : II.VisitedUnaffected)
       assert(TN->getLevel() == TN->getIDom()->getLevel() + 1 &&
              "TN should have been updated by an affected ancestor");


        


More information about the llvm-commits mailing list