diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-05-06 17:02:15 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-05-06 17:02:15 +0000 |
commit | 8304a54201c0c0b408fc70ec18baf9a2b6cc23d3 (patch) | |
tree | 3843aa9e7a922001ca87c8cf82b9ce9afab86359 /lib/CodeGen/CGDebugInfo.cpp | |
parent | a7e893482b47589d82a8126afd7d0ba025b8f202 (diff) | |
download | clang-8304a54201c0c0b408fc70ec18baf9a2b6cc23d3.tar.gz clang-8304a54201c0c0b408fc70ec18baf9a2b6cc23d3.tar.bz2 clang-8304a54201c0c0b408fc70ec18baf9a2b6cc23d3.tar.xz |
Revert "DebugInfo: Emit the definition of enums when the definition preceeds the declaration and initial use."
This is breaking the compiler-rt build. Reverting while I
investigate/fix.
This reverts commit r208065.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index f88ac393f9..cd966a0e7f 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1427,21 +1427,6 @@ llvm::DIType CGDebugInfo::getOrCreateInterfaceType(QualType D, return T; } -void CGDebugInfo::completeType(const EnumDecl *ED) { - if (DebugKind <= CodeGenOptions::DebugLineTablesOnly) - return; - QualType Ty = CGM.getContext().getEnumType(ED); - void* TyPtr = Ty.getAsOpaquePtr(); - auto I = TypeCache.find(TyPtr); - if (I != TypeCache.end() && - !llvm::DIType(cast<llvm::MDNode>(static_cast<llvm::Value *>(I->second))) - .isForwardDecl()) - return; - llvm::DIType Res = CreateTypeDefinition(Ty->castAs<EnumType>()); - assert(!Res.isForwardDecl()); - TypeCache[TyPtr] = Res; -} - void CGDebugInfo::completeType(const RecordDecl *RD) { if (DebugKind > CodeGenOptions::LimitedDebugInfo || !CGM.getLangOpts().CPlusPlus) @@ -1930,20 +1915,6 @@ llvm::DIType CGDebugInfo::CreateEnumType(const EnumType *Ty) { return RetTy; } - return CreateTypeDefinition(Ty); -} - -llvm::DIType CGDebugInfo::CreateTypeDefinition(const EnumType *Ty) { - const EnumDecl *ED = Ty->getDecl(); - uint64_t Size = 0; - uint64_t Align = 0; - if (!ED->getTypeForDecl()->isIncompleteType()) { - Size = CGM.getContext().getTypeSize(ED->getTypeForDecl()); - Align = CGM.getContext().getTypeAlign(ED->getTypeForDecl()); - } - - SmallString<256> FullName = getUniqueTagTypeName(Ty, CGM, TheCU); - // Create DIEnumerator elements for each enumerator. SmallVector<llvm::Value *, 16> Enumerators; ED = ED->getDefinition(); |