aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorMircea Trofin <mtrofin@google.com>2021-03-25 12:28:47 -0700
committerMircea Trofin <mtrofin@google.com>2021-03-25 12:29:19 -0700
commit20ad206b605530b827318cb242db7d6c04b273ea (patch)
treee85d7680585a113d30b90de8fae9d53ee4eff462 /llvm/lib/IR/Module.cpp
parentcc9477166a53faced47cbd4146ac4adea431ccfd (diff)
downloadllvm-20ad206b605530b827318cb242db7d6c04b273ea.zip
llvm-20ad206b605530b827318cb242db7d6c04b273ea.tar.gz
llvm-20ad206b605530b827318cb242db7d6c04b273ea.tar.bz2
[NFC] Module::getInstructionCount() is const
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r--llvm/lib/IR/Module.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index b9c3663..41666e8 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -571,9 +571,9 @@ unsigned Module::getCodeViewFlag() const {
return cast<ConstantInt>(Val->getValue())->getZExtValue();
}
-unsigned Module::getInstructionCount() {
+unsigned Module::getInstructionCount() const {
unsigned NumInstrs = 0;
- for (Function &F : FunctionList)
+ for (const Function &F : FunctionList)
NumInstrs += F.getInstructionCount();
return NumInstrs;
}