[cfe-commits] r154570 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Eric Christopher echristo at apple.com
Wed Apr 11 17:35:06 PDT 2012


Author: echristo
Date: Wed Apr 11 19:35:06 2012
New Revision: 154570

URL: http://llvm.org/viewvc/llvm-project?rev=154570&view=rev
Log:
static functions have a need for mangled name debug information too.
The mangler doesn't like non-prototyped functions so only use a mangled
name for prototyped functions.

rdar://11079003

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=154570&r1=154569&r2=154570&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Apr 11 19:35:06 2012
@@ -2009,12 +2009,13 @@
     }
     Name = getFunctionName(FD);
     // Use mangled name as linkage name for c/c++ functions.
-    if (!Fn->hasInternalLinkage())
+    if (FD->hasPrototype()) {
       LinkageName = CGM.getMangledName(GD);
+      Flags |= llvm::DIDescriptor::FlagPrototyped;
+    }
     if (LinkageName == Name)
       LinkageName = StringRef();
-    if (FD->hasPrototype())
-      Flags |= llvm::DIDescriptor::FlagPrototyped;
+
     if (const NamespaceDecl *NSDecl =
         dyn_cast_or_null<NamespaceDecl>(FD->getDeclContext()))
       FDContext = getOrCreateNameSpace(NSDecl);





More information about the cfe-commits mailing list