[llvm] ba24b81 - [llvm-c] Fix outdated comment (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 05:11:34 PST 2023
Author: Nikita Popov
Date: 2023-11-20T14:11:25+01:00
New Revision: ba24b814f2a20a136f0a7a0b492b6ad8a62114c6
URL: https://github.com/llvm/llvm-project/commit/ba24b814f2a20a136f0a7a0b492b6ad8a62114c6
DIFF: https://github.com/llvm/llvm-project/commit/ba24b814f2a20a136f0a7a0b492b6ad8a62114c6.diff
LOG: [llvm-c] Fix outdated comment (NFC)
Use the function value type instead of the element type of the
function pointer type.
Fixes https://github.com/llvm/llvm-project/issues/72798.
Added:
Modified:
llvm/lib/IR/Core.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index f838b0501a88978..b089dd48e55b4d4 100644
--- a/llvm/lib/IR/Core.cpp
+++ b/llvm/lib/IR/Core.cpp
@@ -2447,7 +2447,7 @@ void LLVMAddTargetDependentFunctionAttr(LLVMValueRef Fn, const char *A,
unsigned LLVMCountParams(LLVMValueRef FnRef) {
// This function is strictly redundant to
- // LLVMCountParamTypes(LLVMGetElementType(LLVMTypeOf(FnRef)))
+ // LLVMCountParamTypes(LLVMGlobalGetValueType(FnRef))
return unwrap<Function>(FnRef)->arg_size();
}
More information about the llvm-commits
mailing list