summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2014-07-23 14:25:47 +0000
committeremaste <emaste@FreeBSD.org>2014-07-23 14:25:47 +0000
commitfa849536194409f5071d8b0ee3e83e1cd07d74db (patch)
tree3d41537c3f2846d783a1fee19be4fd6cad4c21af /contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
parent797038915a0ebead2284123bccda6c3a7bb131ac (diff)
downloadFreeBSD-src-fa849536194409f5071d8b0ee3e83e1cd07d74db.zip
FreeBSD-src-fa849536194409f5071d8b0ee3e83e1cd07d74db.tar.gz
MFC r265477: Merge -fstandalone-debug from Clang r198655:
Implement a new -fstandalone-debug option. rdar://problem/15685848 It controls everything that -flimit-debug-info used to, plus the vtable type optimization. The old -fno-limit-debug-info option is now an alias to -fstandalone-debug and vice versa. Standalone is the default on Darwin until dtrace is updated to work with non-standalone debug info (rdar://problem/15758808). Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind because NoStandaloneDebugInfo sounded even more confusing.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
index dc93d95..8be351e 100644
--- a/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1456,13 +1456,13 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty) {
// declaration. The completeType, completeRequiredType, and completeClassData
// callbacks will handle promoting the declaration to a definition.
if (T ||
+ // Under -flimit-debug-info:
(DebugKind <= CodeGenOptions::LimitedDebugInfo &&
- // Under -flimit-debug-info, emit only a declaration unless the type is
- // required to be complete.
- !RD->isCompleteDefinitionRequired() && CGM.getLangOpts().CPlusPlus) ||
- // If the class is dynamic, only emit a declaration. A definition will be
- // emitted whenever the vtable is emitted.
- (CXXDecl && CXXDecl->hasDefinition() && CXXDecl->isDynamicClass()) || T) {
+ // Emit only a forward declaration unless the type is required.
+ ((!RD->isCompleteDefinitionRequired() && CGM.getLangOpts().CPlusPlus) ||
+ // If the class is dynamic, only emit a declaration. A definition will be
+ // emitted whenever the vtable is emitted.
+ (CXXDecl && CXXDecl->hasDefinition() && CXXDecl->isDynamicClass())))) {
llvm::DIDescriptor FDContext =
getContextDescriptor(cast<Decl>(RD->getDeclContext()));
if (!T)
OpenPOWER on IntegriCloud