[llvm] 8b17916 - [RISCV] Fix -Wunused-function in RISCVVLOptimizer.cpp (NFC)

Jie Fu via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 11 08:04:42 PDT 2024


Author: Jie Fu
Date: 2024-10-11T23:03:38+08:00
New Revision: 8b17916217e8443a2740e387ca2ff93acdb46988

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

LOG: [RISCV] Fix -Wunused-function in RISCVVLOptimizer.cpp (NFC)

/llvm-project/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp:125:21:
error: unused function 'operator<<' [-Werror,-Wunused-function]
static raw_ostream &operator<<(raw_ostream &OS, const OperandInfo &OI) {
                    ^
1 error generated.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index 90af9ef898d951..eb1f4df4ff7264 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -122,6 +122,7 @@ struct OperandInfo {
   }
 };
 
+LLVM_ATTRIBUTE_UNUSED
 static raw_ostream &operator<<(raw_ostream &OS, const OperandInfo &OI) {
   OI.print(OS);
   return OS;


        


More information about the llvm-commits mailing list