diff options
author | Diego Novillo <dnovillo@google.com> | 2014-06-24 17:02:03 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@google.com> | 2014-06-24 17:02:03 +0000 |
commit | 10ec44d87a47bd28c1603c56f5a5c48fc1c2b462 (patch) | |
tree | 63cd6ba215694dc97a6b3c172a71e057674635ce /include | |
parent | c33b4883b39a63c518f829e5ce992928137f9551 (diff) | |
download | llvm-10ec44d87a47bd28c1603c56f5a5c48fc1c2b462.tar.gz llvm-10ec44d87a47bd28c1603c56f5a5c48fc1c2b462.tar.bz2 llvm-10ec44d87a47bd28c1603c56f5a5c48fc1c2b462.tar.xz |
Add new debug kind LocTrackingOnly.
Summary:
This new debug emission kind supports emitting line location
information in all instructions, but stops code generation
from emitting debug info to the final output.
This mode is useful when the backend wants to track source
locations during code generation, but it does not want to
produce debug info. This is currently used by optimization
remarks (-pass-remarks, -pass-remarks-missed and
-pass-remarks-analysis).
To prevent debug info emission, DIBuilder never inserts the
annotation 'llvm.dbg.cu' when LocTrackingOnly is enabled.
Reviewers: echristo, dblaikie
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D4234
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/IR/DIBuilder.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/llvm/IR/DIBuilder.h b/include/llvm/IR/DIBuilder.h index 8b05bbb4fd..2673504096 100644 --- a/include/llvm/IR/DIBuilder.h +++ b/include/llvm/IR/DIBuilder.h @@ -108,12 +108,23 @@ namespace llvm { /// Objective-C. /// @param SplitName The name of the file that we'll split debug info out /// into. + /// @param Kind The kind of debug information to generate. + /// @param EmitDebugInfo A boolean flag which indicates whether debug + /// information should be written to the final + /// output or not. When this is false, debug + /// information annotations will be present in + /// the IL but they are not written to the final + /// assembly or object file. This supports tracking + /// source location information in the back end + /// without actually changing the output (e.g., + /// when using optimization remarks). DICompileUnit createCompileUnit(unsigned Lang, StringRef File, StringRef Dir, StringRef Producer, bool isOptimized, StringRef Flags, unsigned RV, StringRef SplitName = StringRef(), - DebugEmissionKind Kind = FullDebug); + DebugEmissionKind Kind = FullDebug, + bool EmitDebugInfo = true); /// createFile - Create a file descriptor to hold debugging information /// for a file. |