r188491 - DebugInfo: Add a FIXME, remove a FIXME.

David Blaikie dblaikie at gmail.com
Thu Aug 15 14:21:20 PDT 2013


Author: dblaikie
Date: Thu Aug 15 16:21:19 2013
New Revision: 188491

URL: http://llvm.org/viewvc/llvm-project?rev=188491&view=rev
Log:
DebugInfo: Add a FIXME, remove a FIXME.

(the removed FIXME no longer applies since we made this debug info
optimization not apply to C)

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=188491&r1=188490&r2=188491&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Aug 15 16:21:19 2013
@@ -1430,9 +1430,6 @@ llvm::DIType CGDebugInfo::CreateType(con
   // 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::getOrCreateTyp
   // 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)));





More information about the cfe-commits mailing list