[PATCH] D49915: [IR] Add a boolean field in DILocation to know if a line must covered or not
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 17 19:24:18 PDT 2018
rnk added a comment.
Needs tests, but I'm on board with this and the implementation.
================
Comment at: docs/SourceLevelDebugging.rst:436
+When the flag ImplicitCode is true then it means that the Instruction has been
+added by the front-end but doesn't correspond to a real code. For example
+
----------------
"a real code" isn't very descriptive. Consider "doesn't correspond to source code written by the user".
================
Comment at: docs/SourceLevelDebugging.rst:446
+At the end of the scope the MyObject's destructor is called but it isn't written
+explicitely. This information is useful to avoid to have counters on brackets when
+making code coverage.
----------------
"explicitly"
================
Comment at: include/llvm/IR/DebugInfoMetadata.h:1469
+ /// Check if the location corresponds to an implicit code.
+ /// When the ImplicitCode flag is true, it means that the Instruction
----------------
Code is a weird word, I believe it's more correct to say "... corresponds to implicit code."
================
Comment at: include/llvm/IR/Metadata.h:69-72
+ unsigned char Storage : 7;
// TODO: expose remaining bits to subclasses.
+ bool ImplicitCode : 1;
----------------
This will not achieve the layout you want with MSVC. I would recommend using uint8_t for both to ensure they are packed.
Repository:
rL LLVM
https://reviews.llvm.org/D49915
More information about the llvm-commits
mailing list