Index: clang/lib/CodeGen/CGDebugInfo.cpp =================================================================== --- clang/lib/CodeGen/CGDebugInfo.cpp +++ clang/lib/CodeGen/CGDebugInfo.cpp @@ -409,6 +409,10 @@ // If the location is not valid then use main input file. return TheCU->getFile(); + if (!llvm::sys::path::is_absolute(FileName)) { + FileName = llvm::sys::path::remove_leading_dotslash(FileName); + } + // Cache the results. auto It = DIFileCache.find(FileName.data()); if (It != DIFileCache.end()) {