[llvm] ba2ac68 - AsmWriter - printConstVCalls/printNonConstVCalls - avoid std::vector pass by value. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 27 01:39:19 PDT 2020
Author: Simon Pilgrim
Date: 2020-06-27T09:38:37+01:00
New Revision: ba2ac689e606f1011d9a5b260c31a399316514df
URL: https://github.com/llvm/llvm-project/commit/ba2ac689e606f1011d9a5b260c31a399316514df
DIFF: https://github.com/llvm/llvm-project/commit/ba2ac689e606f1011d9a5b260c31a399316514df.diff
LOG: AsmWriter - printConstVCalls/printNonConstVCalls - avoid std::vector pass by value. NFCI.
Added:
Modified:
llvm/lib/IR/AsmWriter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 53bfae23441b..6930ad857964 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -2510,10 +2510,10 @@ class AssemblyWriter {
void printTypeIdInfo(const FunctionSummary::TypeIdInfo &TIDInfo);
void printVFuncId(const FunctionSummary::VFuncId VFId);
void
- printNonConstVCalls(const std::vector<FunctionSummary::VFuncId> VCallList,
+ printNonConstVCalls(const std::vector<FunctionSummary::VFuncId> &VCallList,
const char *Tag);
void
- printConstVCalls(const std::vector<FunctionSummary::ConstVCall> VCallList,
+ printConstVCalls(const std::vector<FunctionSummary::ConstVCall> &VCallList,
const char *Tag);
private:
@@ -3184,7 +3184,7 @@ void AssemblyWriter::printVFuncId(const FunctionSummary::VFuncId VFId) {
}
void AssemblyWriter::printNonConstVCalls(
- const std::vector<FunctionSummary::VFuncId> VCallList, const char *Tag) {
+ const std::vector<FunctionSummary::VFuncId> &VCallList, const char *Tag) {
Out << Tag << ": (";
FieldSeparator FS;
for (auto &VFuncId : VCallList) {
@@ -3195,7 +3195,8 @@ void AssemblyWriter::printNonConstVCalls(
}
void AssemblyWriter::printConstVCalls(
- const std::vector<FunctionSummary::ConstVCall> VCallList, const char *Tag) {
+ const std::vector<FunctionSummary::ConstVCall> &VCallList,
+ const char *Tag) {
Out << Tag << ": (";
FieldSeparator FS;
for (auto &ConstVCall : VCallList) {
More information about the llvm-commits
mailing list