[llvm-commits] [hlvm] r38001 - in /hlvm/trunk/hlvm/AST: Location.h Node.h

Reid Spencer reid at x10sys.com
Sat Jul 7 16:58:50 PDT 2007


Author: reid
Date: Sat Jul  7 18:58:49 2007
New Revision: 38001

URL: http://llvm.org/viewvc/llvm-project?rev=38001&view=rev
Log:
Incorporate Location into each node.

Modified:
    hlvm/trunk/hlvm/AST/Location.h
    hlvm/trunk/hlvm/AST/Node.h

Modified: hlvm/trunk/hlvm/AST/Location.h
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/Location.h?rev=38001&r1=38000&r2=38001&view=diff

==============================================================================
--- hlvm/trunk/hlvm/AST/Location.h (original)
+++ hlvm/trunk/hlvm/AST/Location.h Sat Jul  7 18:58:49 2007
@@ -40,6 +40,7 @@
     public:
       Location(uint32_t line, uint32_t col, const std::string& fname)
         : line_(line), col_(col), fname_(fname)  {}
+      Location() : line_(0), col_(0), fname_("") {}
 
     /// @}
     /// @name Accessors

Modified: hlvm/trunk/hlvm/AST/Node.h
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/Node.h?rev=38001&r1=38000&r2=38001&view=diff

==============================================================================
--- hlvm/trunk/hlvm/AST/Node.h (original)
+++ hlvm/trunk/hlvm/AST/Node.h Sat Jul  7 18:58:49 2007
@@ -25,8 +25,8 @@
 #define HLVM_AST_NODE_H
 
 #include <llvm/Support/Casting.h>
+#include <hlvm/AST/Location.h>
 #include <vector>
-#include <string>
 
 /// This namespace is for all HLVM software. It ensures that HLVM software does
 /// not collide with any other software. Hopefully HLVM is not a namespace used
@@ -229,6 +229,7 @@
       Node* parent_;            ///< The node that owns this node.
       std::vector<Node> kids_;  ///< The vector of children nodes.
       std::string name_;        ///< The name of this node.
+      Location loc_;            ///< The source location corresponding to node.
     /// @}
   };
 } // AST





More information about the llvm-commits mailing list