[dragonegg] r182258 - Initialize the debug location in a way that works for all gcc versions.

Duncan Sands baldrick at free.fr
Mon May 20 06:29:43 PDT 2013


Author: baldrick
Date: Mon May 20 08:29:43 2013
New Revision: 182258

URL: http://llvm.org/viewvc/llvm-project?rev=182258&view=rev
Log:
Initialize the debug location in a way that works for all gcc versions.

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=182258&r1=182257&r2=182258&view=diff
==============================================================================
--- dragonegg/trunk/src/Debug.cpp (original)
+++ dragonegg/trunk/src/Debug.cpp Mon May 20 08:29:43 2013
@@ -153,7 +153,7 @@ static StringRef GetNodeName(tree Node)
 /// whether the node is a TYPE or DECL.  UseStub is true if we should consider
 /// the type stub as the actually location (ignored in struct/unions/enums.)
 static expanded_location GetNodeLocation(tree Node, bool UseStub = true) {
-  expanded_location Location = { NULL, 0, 0, false };
+  expanded_location Location = {};
 
   if (Node == NULL_TREE)
     return Location;
@@ -625,7 +625,8 @@ DIType DebugInfo::createEnumType(tree ty
 
   llvm::DIArray EltArray = Builder.getOrCreateArray(Elements);
 
-  expanded_location Loc = { NULL, 0, 0, false };
+  expanded_location Loc = {};
+
   if (TYPE_SIZE(type))
     // Incomplete enums do not  have any location info.
     Loc = GetNodeLocation(TREE_CHAIN(type), false);





More information about the llvm-commits mailing list