summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AsmWriter.cpp
diff options
context:
space:
mode:
authorCalixte Denizet <cdenizet@mozilla.com>2018-09-20 08:53:06 +0000
committerCalixte Denizet <cdenizet@mozilla.com>2018-09-20 08:53:06 +0000
commiteb7f60201cb348223d3feec20638b3b084804a26 (patch)
tree91714ce01f4b5ac14c50086733f91282dcf0609f /llvm/lib/IR/AsmWriter.cpp
parent226f3ef5a52db932e4acbcfdf9bb860a25ba6d59 (diff)
downloadbcm5719-llvm-eb7f60201cb348223d3feec20638b3b084804a26.tar.gz
bcm5719-llvm-eb7f60201cb348223d3feec20638b3b084804a26.zip
[IR] Add a boolean field in DILocation to know if a line must covered or not
Summary: Some lines have a hit counter where they should not have one. For example, in C++, some cleanup is adding at the end of a scope represented by a '}'. So such a line has a hit counter where a user expects to not have one. The goal of the patch is to add this information in DILocation which is used to get the covered lines in GCOVProfiling.cpp. A following patch in clang will add this information when generating IR (https://reviews.llvm.org/D49916). Reviewers: marco-c, davidxl, vsk, javed.absar, rnk Reviewed By: rnk Subscribers: eraman, xur, danielcdh, aprantl, rnk, dblaikie, #debug-info, vsk, llvm-commits, sylvestre.ledru Tags: #debug-info Differential Revision: https://reviews.llvm.org/D49915 llvm-svn: 342631
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 1a8e3002b3b..536dbe064fc 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -1754,6 +1754,8 @@ static void writeDILocation(raw_ostream &Out, const DILocation *DL,
Printer.printInt("column", DL->getColumn());
Printer.printMetadata("scope", DL->getRawScope(), /* ShouldSkipNull */ false);
Printer.printMetadata("inlinedAt", DL->getRawInlinedAt());
+ Printer.printBool("isImplicitCode", DL->isImplicitCode(),
+ /* Default */ false);
Out << ")";
}
OpenPOWER on IntegriCloud