[dragonegg] r186952 - The debug info verifier requires a non-empty name here. Pacify it.

David Blaikie dblaikie at gmail.com
Tue Jul 23 10:01:42 PDT 2013


On Tue, Jul 23, 2013 at 9:08 AM, Duncan Sands <baldrick at free.fr> wrote:
> Author: baldrick
> Date: Tue Jul 23 11:07:59 2013
> New Revision: 186952
>
> URL: http://llvm.org/viewvc/llvm-project?rev=186952&view=rev
> Log:
> The debug info verifier requires a non-empty name here.  Pacify it.

If such debug info really doesn't need a name (I haven't looked at the
code further to see which entity this code is for - a global variable,
I guess) & we can/do support that (a test case would be good) we
should just fix the verification not to complain about such a valid
construct.

>
> Modified:
>     dragonegg/trunk/src/Debug.cpp
>
> Modified: dragonegg/trunk/src/Debug.cpp
> URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Debug.cpp?rev=186952&r1=186951&r2=186952&view=diff
> ==============================================================================
> --- dragonegg/trunk/src/Debug.cpp (original)
> +++ dragonegg/trunk/src/Debug.cpp Tue Jul 23 11:07:59 2013
> @@ -411,6 +411,8 @@ void DebugInfo::EmitGlobalVariable(Globa
>    expanded_location Loc = expand_location(DECL_SOURCE_LOCATION(decl));
>    DIType TyD = getOrCreateType(TREE_TYPE(decl));
>    StringRef DispName = GV->getName();
> +  if (DispName.empty())
> +    DispName = "__unknown__";
>    if (DECL_NAME(decl)) {
>      if (IDENTIFIER_POINTER(DECL_NAME(decl)))
>        DispName = IDENTIFIER_POINTER(DECL_NAME(decl));
>
>
> _______________________________________________
> 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