llvm-project/clang/lib
Taewook Oh 0fb5b78892 Use the file name from linemarker for debug info if an input is preprocessed source.
Summary:
Even in the case of the input file is a preprocessed source, clang uses the file name of the preprocesses source for debug info (DW_AT_name attribute for DW_TAG_compile_unit). However, gcc uses the file name specified in the first linemarker instead. This makes more sense because the one specified in the linemarker represents the "actual" source file name.

Clang already uses the file name specified in the first linemarker for Module name (https://github.com/llvm-mirror/clang/blob/master/lib/Frontend/FrontendAction.cpp#L779) if the input is preprocessed. This patch makes clang to use the same value for debug info as well.

Reviewers: compnerd, rnk, dblaikie, rsmith

Reviewed By: rnk

Subscribers: aprantl, cfe-commits

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

llvm-svn: 311037
2017-08-16 19:36:24 +00:00
..
ARCMigrate Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC. 2017-06-03 06:23:19 +00:00
AST Fix a UBSan failure where this boolean was copied when uninitialized. 2017-08-16 07:22:49 +00:00
ASTMatchers [ASTMatchers] Fix use after free. 2017-06-09 17:55:42 +00:00
Analysis Reland "Thread Safety Analysis: fix assert_capability." 2017-08-08 19:44:34 +00:00
Basic [OpenCL] Allow targets to select address space per type 2017-08-15 09:38:18 +00:00
CodeGen Use the file name from linemarker for debug info if an input is preprocessed source. 2017-08-16 19:36:24 +00:00
Driver [Driver] SafeStack does not need a runtime library on Fuchsia 2017-08-16 19:06:05 +00:00
Edit [clang] Fix format specifiers fixits for nested macros 2017-06-20 20:46:58 +00:00
Format clang-format: [JS] wrap optional properties in type aliases. 2017-08-14 16:09:08 +00:00
Frontend Fix comments about __OPENCL_MEMORY_SCOPE_* macros 2017-08-16 04:15:28 +00:00
FrontendTool Update after LLVM change r309087 2017-07-26 09:10:17 +00:00
Headers [OpenCL] Remove extra select functions from opencl-c.h 2017-08-05 02:23:47 +00:00
Index [index] Update indexing to handle CXXDeductionGuideDecls properly 2017-08-15 17:20:37 +00:00
Lex Rename cxx1z -> cxx17 across all diagnostic IDs. 2017-08-13 23:37:29 +00:00
Parse Allow pretty platform names in availability attributes 2017-08-15 14:42:01 +00:00
Rewrite [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output 2017-08-03 18:12:22 +00:00
Sema PR19668, PR23034: Fix handling of move constructors and deleted copy 2017-08-16 01:49:53 +00:00
Serialization PR19668, PR23034: Fix handling of move constructors and deleted copy 2017-08-16 01:49:53 +00:00
StaticAnalyzer [analyzer] Fix SimpleSValBuilder::simplifySVal 2017-08-14 21:23:08 +00:00
Tooling Switch to consumeError(), since this can crash otherwise. 2017-08-15 21:20:41 +00:00
CMakeLists.txt