[dragonegg] r186952 - The debug info verifier requires a non-empty name here. Pacify it.
Duncan Sands
baldrick at free.fr
Tue Jul 23 09:08:00 PDT 2013
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.
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));
More information about the llvm-commits
mailing list