[llvm] 6c7557d - [DXIL] Fix -Wunused-but-set-variable after #97593

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 14:55:07 PDT 2024


Author: Fangrui Song
Date: 2024-07-30T14:55:03-07:00
New Revision: 6c7557d44139e335c037c644545388c7e7d6a2e4

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

LOG: [DXIL] Fix -Wunused-but-set-variable after #97593

Added: 
    

Modified: 
    llvm/utils/TableGen/DXILEmitter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/utils/TableGen/DXILEmitter.cpp b/llvm/utils/TableGen/DXILEmitter.cpp
index 2ae69086e6f6e..b6a2686cfde30 100644
--- a/llvm/utils/TableGen/DXILEmitter.cpp
+++ b/llvm/utils/TableGen/DXILEmitter.cpp
@@ -140,7 +140,7 @@ DXILOperationDesc::DXILOperationDesc(const Record *R) {
     if (isAny == 1) {
       // All overload types in a DXIL Op are required to be of the same type.
       if (!OverloadParamIndices.empty()) {
-        bool knownType = true;
+        [[maybe_unused]] bool knownType = true;
         // Ensure that the same overload type registered earlier is being used
         for (auto Idx : OverloadParamIndices) {
           if (TR != ParamTypeRecs[Idx]) {


        


More information about the llvm-commits mailing list