[llvm] e42a4c7 - [Analysis] Fix -Wunused-function in ConstantFolding.cpp (NFC)

Jie Fu via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 05:51:04 PDT 2024


Author: Jie Fu
Date: 2024-06-18T20:49:29+08:00
New Revision: e42a4c70a112c1c0f07ccb8b57b4fda4cfa11b49

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

LOG: [Analysis] Fix -Wunused-function in ConstantFolding.cpp (NFC)

/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp:1787:11:
error: unused function 'ConstantFoldFP128' [-Werror,-Wunused-function]
Constant *ConstantFoldFP128(long double (*NativeFP)(long double),
          ^
1 error generated.

Added: 
    

Modified: 
    llvm/lib/Analysis/ConstantFolding.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index 4087cf3dd76b8..7a4bc48412514 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -1784,6 +1784,7 @@ Constant *ConstantFoldFP(double (*NativeFP)(double), const APFloat &V,
 }
 
 #if defined(HAS_IEE754_FLOAT128)
+LLVM_ATTRIBUTE_UNUSED
 Constant *ConstantFoldFP128(long double (*NativeFP)(long double),
                             const APFloat &V, Type *Ty) {
   llvm_fenv_clearexcept();


        


More information about the llvm-commits mailing list