summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
authorAmy Huang <akhuang@google.com>2020-01-13 15:54:54 -0800
committerAmy Huang <akhuang@google.com>2020-01-13 15:59:03 -0800
commit53539bb032d162e0147c0e9650a5d1c7ca77dae0 (patch)
tree85b602a6fc5d07957698fd59f49f3036c4616f67 /clang/include
parentc7748404920b3674e79059cbbe73b6041a214444 (diff)
downloadbcm5719-llvm-53539bb032d162e0147c0e9650a5d1c7ca77dae0.tar.gz
bcm5719-llvm-53539bb032d162e0147c0e9650a5d1c7ca77dae0.zip
[DebugInfo] Add another level to DebugInfoKind called Constructor
The option will limit debug info by only emitting complete class type information when its constructor is emitted. This patch changes comparisons with LimitedDebugInfo to use the new level instead. Differential Revision: https://reviews.llvm.org/D72427
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/Basic/CodeGenOptions.h5
-rw-r--r--clang/include/clang/Basic/DebugInfoOptions.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/clang/include/clang/Basic/CodeGenOptions.h b/clang/include/clang/Basic/CodeGenOptions.h
index 900620a3929..21ac54e8ee1 100644
--- a/clang/include/clang/Basic/CodeGenOptions.h
+++ b/clang/include/clang/Basic/CodeGenOptions.h
@@ -357,6 +357,11 @@ public:
/// Check if CSIR profile use is on.
bool hasProfileCSIRUse() const { return getProfileUse() == ProfileCSIRInstr; }
+
+ /// Check if type and variable info should be emitted.
+ bool hasReducedDebugInfo() const {
+ return getDebugInfo() >= codegenoptions::DebugInfoConstructor;
+ }
};
} // end namespace clang
diff --git a/clang/include/clang/Basic/DebugInfoOptions.h b/clang/include/clang/Basic/DebugInfoOptions.h
index ac18a3a4796..586168bd015 100644
--- a/clang/include/clang/Basic/DebugInfoOptions.h
+++ b/clang/include/clang/Basic/DebugInfoOptions.h
@@ -34,6 +34,11 @@ enum DebugInfoKind {
/// (-gline-tables-only).
DebugLineTablesOnly,
+ /// Limit generated debug info for classes to reduce size. This emits class
+ /// type info only where the constructor is emitted, if it is a class that
+ /// has a constructor.
+ DebugInfoConstructor,
+
/// Limit generated debug info to reduce size (-fno-standalone-debug). This
/// emits forward decls for types that could be replaced with forward decls in
/// the source code. For dynamic C++ classes type info is only emitted into
OpenPOWER on IntegriCloud