diff options
author | Jie Fu <jiefu@tencent.com> | 2023-11-14 16:57:24 +0800 |
---|---|---|
committer | Jie Fu <jiefu@tencent.com> | 2023-11-14 16:57:24 +0800 |
commit | e582fe64449b56005b945a32cc06e70bd8ef6ab1 (patch) | |
tree | ecaf7b8c296d5d4e8b572f44f1d5ad7ed259bab9 /llvm/lib/IR/ConstantFold.cpp | |
parent | 47eeee297775347cbdb7624d6a766c2a3eec4a59 (diff) | |
download | llvm-e582fe64449b56005b945a32cc06e70bd8ef6ab1.zip llvm-e582fe64449b56005b945a32cc06e70bd8ef6ab1.tar.gz llvm-e582fe64449b56005b945a32cc06e70bd8ef6ab1.tar.bz2 |
[llvm] Fix -Wunused-variable in ConstantFold.cpp (NFC)
/llvm-project/llvm/lib/IR/ConstantFold.cpp:137:12: error: unused variable 'CSize' [-Werror,-Wunused-variable]
unsigned CSize = cast<IntegerType>(C->getType())->getBitWidth()/8;
^
1 error generated.
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r-- | llvm/lib/IR/ConstantFold.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp index 25f7ac2..d499d74 100644 --- a/llvm/lib/IR/ConstantFold.cpp +++ b/llvm/lib/IR/ConstantFold.cpp @@ -134,7 +134,7 @@ static Constant *ExtractConstantBytes(Constant *C, unsigned ByteStart, assert(C->getType()->isIntegerTy() && (cast<IntegerType>(C->getType())->getBitWidth() & 7) == 0 && "Non-byte sized integer input"); - unsigned CSize = cast<IntegerType>(C->getType())->getBitWidth()/8; + [[maybe_unused]] unsigned CSize = cast<IntegerType>(C->getType())->getBitWidth()/8; assert(ByteSize && "Must be accessing some piece"); assert(ByteStart+ByteSize <= CSize && "Extracting invalid piece from input"); assert(ByteSize != CSize && "Should not extract everything"); |