summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite/Frontend
diff options
context:
space:
mode:
authorLubos Lunak <l.lunak@centrum.cz>2014-05-01 12:45:08 +0000
committerLubos Lunak <l.lunak@centrum.cz>2014-05-01 12:45:08 +0000
commitc5f2bca86615322f0295f0cf448dfc350f6e7d1e (patch)
tree01c0858f2ac0e2dce845429c996fa3cabd525749 /clang/lib/Rewrite/Frontend
parentadcf88eeda3e08ad0dd506adb6d0ad6401863f5b (diff)
downloadbcm5719-llvm-c5f2bca86615322f0295f0cf448dfc350f6e7d1e.tar.gz
bcm5719-llvm-c5f2bca86615322f0295f0cf448dfc350f6e7d1e.zip
write a line marker right before adding included file
Enclosing the original #include directive inside #if 0 adds lines, so warning/errors messages would have the line number off in "In file included from <file>:<line>:", so add line marker to fix this. llvm-svn: 207756
Diffstat (limited to 'clang/lib/Rewrite/Frontend')
-rw-r--r--clang/lib/Rewrite/Frontend/InclusionRewriter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp b/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp
index 058960d3e43..70b299213f3 100644
--- a/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp
+++ b/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp
@@ -383,6 +383,7 @@ bool InclusionRewriter::Process(FileID FileId,
case tok::pp_import: {
CommentOutDirective(RawLex, HashToken, FromFile, EOL, NextToWrite,
Line);
+ WriteLineInfo(FileName, Line - 1, FileType, EOL, "");
StringRef LineInfoExtra;
if (const FileChange *Change = FindFileChangeLocation(
HashToken.getLocation())) {
OpenPOWER on IntegriCloud