From 4fed928f53dbea24914bc0db307e0988c6e44c8c Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 27 May 2016 12:30:51 +0000 Subject: Avoid some copies by using const references. clang-tidy's performance-unnecessary-copy-initialization with some manual fixes. No functional changes intended. llvm-svn: 270988 --- llvm/lib/Transforms/IPO/SampleProfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/IPO/SampleProfile.cpp') diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp index afafd45..deba6ea 100644 --- a/llvm/lib/Transforms/IPO/SampleProfile.cpp +++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp @@ -445,7 +445,7 @@ void SampleProfileLoader::printBlockWeight(raw_ostream &OS, /// \returns the weight of \p Inst. ErrorOr SampleProfileLoader::getInstWeight(const Instruction &Inst) const { - DebugLoc DLoc = Inst.getDebugLoc(); + const DebugLoc &DLoc = Inst.getDebugLoc(); if (!DLoc) return std::error_code(); -- cgit v1.1