[llvm] 851bacb - [IR] DebugProgramInstruction.cpp - fix GCC Wparentheses warning. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 3 02:18:43 PDT 2024


Author: Simon Pilgrim
Date: 2024-09-03T10:18:34+01:00
New Revision: 851bacb7ce66213d667c6ed375ce43ab0ed3cd56

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

LOG: [IR] DebugProgramInstruction.cpp - fix GCC Wparentheses warning. NFC.

Added: 
    

Modified: 
    llvm/lib/IR/DebugProgramInstruction.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/DebugProgramInstruction.cpp b/llvm/lib/IR/DebugProgramInstruction.cpp
index c47d1ee4856ba8..0db908211b553c 100644
--- a/llvm/lib/IR/DebugProgramInstruction.cpp
+++ b/llvm/lib/IR/DebugProgramInstruction.cpp
@@ -477,8 +477,8 @@ Value *DbgVariableRecord::getAddress() const {
     return V->getValue();
 
   // When the value goes to null, it gets replaced by an empty MDNode.
-  assert(!MD ||
-         !cast<MDNode>(MD)->getNumOperands() && "Expected an empty MDNode");
+  assert((!MD || !cast<MDNode>(MD)->getNumOperands()) &&
+         "Expected an empty MDNode");
   return nullptr;
 }
 


        


More information about the llvm-commits mailing list