[llvm-commits] [llvm-gcc-4.2] r68848 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Dan Gohman
gohman at apple.com
Mon Apr 13 12:59:08 PDT 2009
On Apr 10, 2009, at 5:17 PM, Devang Patel wrote:
> Author: dpatel
> Date: Fri Apr 10 19:17:54 2009
> New Revision: 68848
>
> URL: http://llvm.org/viewvc/llvm-project?rev=68848&view=rev
> Log:
> If linkage name is not available then use function display name as
> linkage name.
Hi Devang,
What does this fix? Why is a bogus linkage name better than no
linkage name?
Dan
>
>
> Modified:
> llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
>
> Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=68848&r1=68847&r2=68848&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
> +++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Fri Apr 10 19:17:54 2009
> @@ -190,7 +190,7 @@
> return IDENTIFIER_POINTER(DECL_ASSEMBLER_NAME(Node));
> }
> }
> - return "";
> + return NULL;
> }
>
> DebugInfo::DebugInfo(Module *m)
> @@ -211,12 +211,11 @@
> // Gather location information.
> expanded_location Loc = GetNodeLocation(FnDecl, false);
> const char *LinkageName = getLinkageName(FnDecl);
> -
> + const char *FnName = lang_hooks.dwarf_name(FnDecl, 0);
> DISubprogram SP =
> DebugFactory.CreateSubprogram(findRegion(FnDecl),
> - lang_hooks.dwarf_name(FnDecl, 0),
> - lang_hooks.dwarf_name(FnDecl, 0),
> - LinkageName,
> + FnName, FnName,
> + LinkageName ? LinkageName : FnName,
> getOrCreateCompileUnit(Loc.file),
> CurLineNo,
> getOrCreateType(TREE_TYPE(FnDecl)),
> Fn->hasInternalLinkage(),
> @@ -345,11 +344,11 @@
> if (IDENTIFIER_POINTER(DECL_NAME(decl)))
> DispName = IDENTIFIER_POINTER(DECL_NAME(decl));
> }
> -
> + const char *LinkageName = getLinkageName(decl);
> DebugFactory.CreateGlobalVariable(getOrCreateCompileUnit(Loc.file),
> GV->getNameStr(),
> DispName,
> - getLinkageName(decl),
> + LinkageName ? LinkageName :
> DispName,
>
> getOrCreateCompileUnit(Loc.file), Loc.line,
> TyD, GV->hasInternalLinkage(),
> true/*definition*/, GV);
> @@ -668,7 +667,7 @@
> DIType SPTy = getOrCreateType(TREE_TYPE(Member));
> DISubprogram SP =
> DebugFactory.CreateSubprogram(findRegion(Member), MemberName,
> MemberName,
> - LinkageName,
> + LinkageName ? LinkageName :
> MemberName,
>
> getOrCreateCompileUnit(MemLoc.file),
> MemLoc.line, SPTy, false, false);
> EltTys.push_back(SP);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list