From 9fdb00e0db9baa90d38ddbb0c99cf8fce55088c9 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 15 Jun 2017 15:23:45 +0200 Subject: llvm37: do not copy DILocation to getDSPIPath DILocation is not copyable in LLVM 3.7. So, pass it as reference and make it const given we do not write to it. Signed-off-by: Jiri Slaby --- lib/Module/InstructionInfoTable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Module/InstructionInfoTable.cpp b/lib/Module/InstructionInfoTable.cpp index adf05442..8f6c7c2b 100644 --- a/lib/Module/InstructionInfoTable.cpp +++ b/lib/Module/InstructionInfoTable.cpp @@ -87,7 +87,7 @@ static void buildInstructionToLineMap(Module *m, } } -static std::string getDSPIPath(DILocation Loc) { +static std::string getDSPIPath(const DILocation &Loc) { std::string dir = Loc.getDirectory(); std::string file = Loc.getFilename(); if (dir.empty() || file[0] == '/') { -- cgit 1.4.1