summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CodeGen.cpp
diff options
context:
space:
mode:
authorTaewook Oh <twoh@fb.com>2017-08-16 19:36:24 +0000
committerTaewook Oh <twoh@fb.com>2017-08-16 19:36:24 +0000
commit0fb5b788920b6039b13197fd11212c3cf8d9d714 (patch)
tree8b360de9fe22f7bae05e6fc4bcbd38e8fbf894b6 /llvm/lib/CodeGen/CodeGen.cpp
parentad00bd603e30852cc5f93caec29e27ddb767ea11 (diff)
downloadbcm5719-llvm-0fb5b788920b6039b13197fd11212c3cf8d9d714.tar.gz
bcm5719-llvm-0fb5b788920b6039b13197fd11212c3cf8d9d714.zip
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
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud