[llvm] 1232b9d - [RISCV] Fix -Wbraced-scalar-init warning. NFC

Philipp Tomsich via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 08:57:14 PST 2023


Author: Philipp Tomsich
Date: 2023-02-13T17:56:31+01:00
New Revision: 1232b9d47209fda762a9e5bc189d029451db5381

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

LOG: [RISCV] Fix -Wbraced-scalar-init warning. NFC

Fix the following warning:
/lib/Target/RISCV/RISCVISelLowering.cpp:315:24: error: braces around scalar initializer [-Werror,-Wbraced-scalar-init]
    setOperationAction({ISD::CTLZ}, XLenVT, Legal);
                       ^~~~~~~~~~~

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 3c6404e14666..5a04f11c36ef 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -312,7 +312,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
   }
 
   if (Subtarget.hasVendorXTHeadBb()) {
-    setOperationAction({ISD::CTLZ}, XLenVT, Legal);
+    setOperationAction(ISD::CTLZ, XLenVT, Legal);
 
     // We need the custom lowering to make sure that the resulting sequence
     // for the 32bit case is efficient on 64bit targets.


        


More information about the llvm-commits mailing list