diff options
| author | Diego Novillo <dnovillo@google.com> | 2014-06-24 17:02:17 +0000 |
|---|---|---|
| committer | Diego Novillo <dnovillo@google.com> | 2014-06-24 17:02:17 +0000 |
| commit | e8e398049c5cb9d8ee10a8fcee11cb5df2f8999f (patch) | |
| tree | fdafeadaf109eaad92efcd14121d244e8d85c2d1 /include | |
| parent | 709135b01b238ef34d701ec67219c7e410b265de (diff) | |
| download | clang-e8e398049c5cb9d8ee10a8fcee11cb5df2f8999f.tar.gz clang-e8e398049c5cb9d8ee10a8fcee11cb5df2f8999f.tar.bz2 clang-e8e398049c5cb9d8ee10a8fcee11cb5df2f8999f.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 (-Rpass, -Rpass-missed and -Rpass-analysis).
When one of the -Rpass flags is used, the front end will enable
location tracking, only if no other debug option is enabled.
To prevent debug information from being generated, a new debug
info kind LocTrackingOnly causes DIBuilder::createCompileUnit() to
not emit the llvm.dbg.cu annotation. This blocks final code generation
from generating debug info in the back end.
Depends on D4234.
Reviewers: echristo, dblaikie
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4235
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
| -rw-r--r-- | include/clang/Basic/DiagnosticFrontendKinds.td | 3 | ||||
| -rw-r--r-- | include/clang/Frontend/CodeGenOptions.def | 2 | ||||
| -rw-r--r-- | include/clang/Frontend/CodeGenOptions.h | 7 |
3 files changed, 8 insertions, 4 deletions
diff --git a/include/clang/Basic/DiagnosticFrontendKinds.td b/include/clang/Basic/DiagnosticFrontendKinds.td index 2d6ca69695..c08ac992ee 100644 --- a/include/clang/Basic/DiagnosticFrontendKinds.td +++ b/include/clang/Basic/DiagnosticFrontendKinds.td @@ -41,9 +41,6 @@ def remark_fe_backend_optimization_remark_missed : Remark<"%0">, BackendInfo, InGroup<BackendOptimizationRemarkMissed>, DefaultRemark; def remark_fe_backend_optimization_remark_analysis : Remark<"%0">, BackendInfo, InGroup<BackendOptimizationRemarkAnalysis>, DefaultRemark; -def note_fe_backend_optimization_remark_missing_loc : Note<"use " - "-gline-tables-only -gcolumn-info to track source location information " - "for this optimization remark">; def note_fe_backend_optimization_remark_invalid_loc : Note<"could " "not determine the original source location for %0:%1:%2">; diff --git a/include/clang/Frontend/CodeGenOptions.def b/include/clang/Frontend/CodeGenOptions.def index 8959185387..1d92efeda2 100644 --- a/include/clang/Frontend/CodeGenOptions.def +++ b/include/clang/Frontend/CodeGenOptions.def @@ -140,7 +140,7 @@ VALUE_CODEGENOPT(NumRegisterParameters, 32, 0) VALUE_CODEGENOPT(SSPBufferSize, 32, 0) /// The kind of generated debug info. -ENUM_CODEGENOPT(DebugInfo, DebugInfoKind, 2, NoDebugInfo) +ENUM_CODEGENOPT(DebugInfo, DebugInfoKind, 3, NoDebugInfo) /// Dwarf version. VALUE_CODEGENOPT(DwarfVersion, 3, 0) diff --git a/include/clang/Frontend/CodeGenOptions.h b/include/clang/Frontend/CodeGenOptions.h index c1ad408b75..3d532cea34 100644 --- a/include/clang/Frontend/CodeGenOptions.h +++ b/include/clang/Frontend/CodeGenOptions.h @@ -53,6 +53,13 @@ public: enum DebugInfoKind { NoDebugInfo, /// Don't generate debug info. + LocTrackingOnly, /// Emit location information but do not generate + /// debug info in the output. This is useful in + /// cases where the backend wants to track source + /// locations for instructions without actually + /// emitting debug info for them (e.g., when -Rpass + /// is used). + DebugLineTablesOnly, /// Emit only debug info necessary for generating /// line number tables (-gline-tables-only). |
