From 4300ed7cd1ec48292a1983bb80161099f15b2023 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Thu, 16 Jan 2020 18:37:28 +0000 Subject: Fix handling of debug information for functions Tracking function locations separately correctly without prefixing it with a directory. --- lib/Module/InstructionInfoTable.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'lib/Module/InstructionInfoTable.cpp') diff --git a/lib/Module/InstructionInfoTable.cpp b/lib/Module/InstructionInfoTable.cpp index 48575c82..90b0e022 100644 --- a/lib/Module/InstructionInfoTable.cpp +++ b/lib/Module/InstructionInfoTable.cpp @@ -81,14 +81,6 @@ buildInstructionToLineMap(const llvm::Module &m) { return mapping; } -static std::string getFullPath(llvm::StringRef Directory, - llvm::StringRef FileName) { - llvm::SmallString<128> file_pathname(Directory); - llvm::sys::path::append(file_pathname, FileName); - - return file_pathname.str(); -} - class DebugInfoExtractor { std::vector> &internedStrings; std::map lineTable; @@ -126,7 +118,7 @@ public: auto dsub = llvm::getDISubprogram(&Func); #endif if (dsub != nullptr) { - auto path = getFullPath(dsub->getDirectory(), dsub->getFilename()); + auto path = dsub->getFilename(); return std::unique_ptr(new FunctionInfo( 0, getInternedString(path), dsub->getLine(), asmLine)); } -- cgit 1.4.1