summaryrefslogtreecommitdiffstats
path: root/llvm/docs
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/docs')
-rw-r--r--llvm/docs/SourceLevelDebugging.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/docs/SourceLevelDebugging.rst b/llvm/docs/SourceLevelDebugging.rst
index 24e70f82d52..4cccfb40bd4 100644
--- a/llvm/docs/SourceLevelDebugging.rst
+++ b/llvm/docs/SourceLevelDebugging.rst
@@ -429,8 +429,23 @@ instruction. One can extract line number information encoded in LLVM IR using
unsigned Line = Loc->getLine();
StringRef File = Loc->getFilename();
StringRef Dir = Loc->getDirectory();
+ bool ImplicitCode = Loc->isImplicitCode();
}
+When the flag ImplicitCode is true then it means that the Instruction has been
+added by the front-end but doesn't correspond to source code written by the user. For example
+
+.. code-block:: c++
+
+ if (MyBoolean) {
+ MyObject MO;
+ ...
+ }
+
+At the end of the scope the MyObject's destructor is called but it isn't written
+explicitly. This information is useful to avoid to have counters on brackets when
+making code coverage.
+
C/C++ global variable information
---------------------------------
OpenPOWER on IntegriCloud