summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-08-15 21:21:19 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-08-15 21:21:19 +0000
commit6a7234472e22d374ef57c126e0e392c9fd209fc8 (patch)
tree299cdbbe5cb207901b0394df69ed1cf85235c642 /clang/lib/CodeGen/CGDebugInfo.cpp
parent12b0809eb1332f74580f2dfb30fb06fa79d2e250 (diff)
downloadbcm5719-llvm-6a7234472e22d374ef57c126e0e392c9fd209fc8.tar.gz
bcm5719-llvm-6a7234472e22d374ef57c126e0e392c9fd209fc8.zip
DebugInfo: Add a FIXME, remove a FIXME.
(the removed FIXME no longer applies since we made this debug info optimization not apply to C) llvm-svn: 188491
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 94f1bde38d5..6ba0bac2f56 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1430,9 +1430,6 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty, bool Declaration) {
// safely be replaced by a forward declaration in the source code.
if (DebugKind <= CodeGenOptions::LimitedDebugInfo && Declaration &&
!RD->isCompleteDefinitionRequired() && CGM.getLangOpts().CPlusPlus) {
- // FIXME: This implementation is problematic; there are some test
- // cases where we violate the above principle, such as
- // test/CodeGen/debug-info-records.c .
llvm::DIDescriptor FDContext =
getContextDescriptor(cast<Decl>(RD->getDeclContext()));
llvm::DIType RetTy = getOrCreateRecordFwdDecl(RD, FDContext);
@@ -1999,6 +1996,10 @@ llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty, llvm::DIFile Unit,
// And update the type cache.
TypeCache[TyPtr] = Res;
+ // FIXME: this getTypeOrNull call seems silly when we just inserted the type
+ // into the cache - but getTypeOrNull has a special case for cached interface
+ // types. We should probably just pull that out as a special case for the
+ // "else" block below & skip the otherwise needless lookup.
llvm::DIType TC = getTypeOrNull(Ty);
if (TC && TC.isForwardDecl())
ReplaceMap.push_back(std::make_pair(TyPtr, static_cast<llvm::Value*>(TC)));
OpenPOWER on IntegriCloud