[llvm] e056e74 - [NFC][inline] Add const to an argument
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 3 13:21:07 PDT 2022
Author: Vitaly Buka
Date: 2022-08-03T13:20:47-07:00
New Revision: e056e74ddae05eadac805c1798b80a214cc57d35
URL: https://github.com/llvm/llvm-project/commit/e056e74ddae05eadac805c1798b80a214cc57d35
DIFF: https://github.com/llvm/llvm-project/commit/e056e74ddae05eadac805c1798b80a214cc57d35.diff
LOG: [NFC][inline] Add const to an argument
Added:
Modified:
llvm/include/llvm/Analysis/InlineCost.h
llvm/lib/Analysis/InlineCost.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/InlineCost.h b/llvm/include/llvm/Analysis/InlineCost.h
index 756f1fb61f95d..eeeb1363e4871 100644
--- a/llvm/include/llvm/Analysis/InlineCost.h
+++ b/llvm/include/llvm/Analysis/InlineCost.h
@@ -244,7 +244,7 @@ InlineParams getInlineParams(unsigned OptLevel, unsigned SizeOptLevel);
/// Return the cost associated with a callsite, including parameter passing
/// and the call/return instruction.
-int getCallsiteCost(CallBase &Call, const DataLayout &DL);
+int getCallsiteCost(const CallBase &Call, const DataLayout &DL);
/// Get an InlineCost object representing the cost of inlining this
/// callsite.
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 8192ed56caf09..d0a33dd596c83 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -2745,7 +2745,7 @@ static bool functionsHaveCompatibleAttributes(
AttributeFuncs::areInlineCompatible(*Caller, *Callee);
}
-int llvm::getCallsiteCost(CallBase &Call, const DataLayout &DL) {
+int llvm::getCallsiteCost(const CallBase &Call, const DataLayout &DL) {
int Cost = 0;
for (unsigned I = 0, E = Call.arg_size(); I != E; ++I) {
if (Call.isByValArgument(I)) {
More information about the llvm-commits
mailing list