[cfe-commits] r38931 - in /cfe/cfe/trunk/include/clang/AST: ./ Decl.h
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:25:54 PDT 2007
Author: sabre
Date: Wed Jul 11 11:25:54 2007
New Revision: 38931
URL: http://llvm.org/viewvc/llvm-project?rev=38931&view=rev
Log:
New file
Added:
cfe/cfe/trunk/include/clang/AST/
cfe/cfe/trunk/include/clang/AST/Decl.h (with props)
Added: cfe/cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/AST/Decl.h?rev=38931&view=auto
==============================================================================
--- cfe/cfe/trunk/include/clang/AST/Decl.h (added)
+++ cfe/cfe/trunk/include/clang/AST/Decl.h Wed Jul 11 11:25:54 2007
@@ -0,0 +1,53 @@
+//===--- Decl.h - Classes for representing declarations ---------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by Chris Lattner and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the Decl interface and subclasses.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_PARSE_DECL_H
+#define LLVM_CLANG_PARSE_DECL_H
+
+#include "clang/ADT/SourceLocation.h"
+
+namespace llvm {
+namespace clang {
+class IdentifierInfo;
+
+/// Decl - This represents one declaration (or definition), e.g. a variable,
+/// typedef, function, struct, etc.
+///
+class Decl {
+ /// Identifier - The identifier for this declaration (e.g. the name for the
+ /// variable, the tag for a struct).
+ IdentifierInfo *Identifier;
+
+ /// Type.
+ /// Kind.
+
+ /// Loc - The location of the declaration in the source code.
+ ///
+ SourceLocation Loc;
+
+ /// Next - Decls are chained together in a singly-linked list by their owning
+ /// object. Currently we allow decls to be owned by a translation unit or a
+ /// function. This way we can deallocate a function body and all the
+ /// declarations within it.
+ Decl *Next;
+public:
+ Decl(IdentifierInfo *Id, SourceLocation loc, Decl *next)
+ : Identifier(Id), Loc(loc), Next(next) {}
+
+
+};
+
+} // end namespace clang
+} // end namespace llvm
+
+#endif
Propchange: cfe/cfe/trunk/include/clang/AST/Decl.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/cfe/trunk/include/clang/AST/Decl.h
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
More information about the cfe-commits
mailing list