]> granicus.if.org Git - clang/commit
Reuse code from CGDebugInfo::getOrCreateFile() when creating the file
authorAdrian Prantl <aprantl@apple.com>
Tue, 11 Dec 2018 16:58:43 +0000 (16:58 +0000)
committerAdrian Prantl <aprantl@apple.com>
Tue, 11 Dec 2018 16:58:43 +0000 (16:58 +0000)
commit676ab32a770f44315f9e716683e2a5334828f170
tree2b7aba6b52c385bb1d9d41f04e6418d14d722d47
parent59639b0645cb218eb6e05b05630254b28a90bfed
Reuse code from CGDebugInfo::getOrCreateFile() when creating the file
for the DICompileUnit.

This addresses post-commit feedback for D55085. Without this patch, a
main source file with an absolute paths may appear in different
DIFiles, once with the absolute path and once with the common prefix
between the absolute path and the current working directory.

Differential Revision: https://reviews.llvm.org/D55519

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348865 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGDebugInfo.h
test/CodeGen/debug-info-compilation-dir.c
test/PCH/debug-info-pch-path.c