[cfe-commits] r38933 - in /cfe/cfe/trunk: AST/ AST/Sema.cpp Driver/PrintParserCallbacks.cpp Driver/clang.cpp Driver/clang.h Makefile Parse/Makefile Sema/ Sema/Sema.cpp clang.xcodeproj/project.pbxproj include/clang/AST/AST.h include/clang/AST/Decl.h include/clang/Parse/Action.h
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:25:56 PDT 2007
Author: sabre
Date: Wed Jul 11 11:25:55 2007
New Revision: 38933
URL: http://llvm.org/viewvc/llvm-project?rev=38933&view=rev
Log:
Start adding support for printing out parser callbacks and adding ast building
Added:
cfe/cfe/trunk/AST/
cfe/cfe/trunk/AST/Sema.cpp (with props)
cfe/cfe/trunk/Driver/PrintParserCallbacks.cpp (with props)
cfe/cfe/trunk/Sema/
cfe/cfe/trunk/Sema/Sema.cpp (with props)
cfe/cfe/trunk/include/clang/AST/AST.h (with props)
Modified:
cfe/cfe/trunk/Driver/clang.cpp
cfe/cfe/trunk/Driver/clang.h
cfe/cfe/trunk/Makefile
cfe/cfe/trunk/Parse/Makefile
cfe/cfe/trunk/clang.xcodeproj/project.pbxproj
cfe/cfe/trunk/include/clang/AST/Decl.h
cfe/cfe/trunk/include/clang/Parse/Action.h
Added: cfe/cfe/trunk/AST/Sema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/Sema.cpp?rev=38933&view=auto
==============================================================================
--- cfe/cfe/trunk/AST/Sema.cpp (added)
+++ cfe/cfe/trunk/AST/Sema.cpp Wed Jul 11 11:25:55 2007
@@ -0,0 +1,15 @@
+//===--- Builder.cpp - AST Builder Implementation -------------------------===//
+//
+// 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 implements the actions class which builds an AST out of a parse
+// stream.
+//
+//===----------------------------------------------------------------------===//
+
+int xx;
\ No newline at end of file
Propchange: cfe/cfe/trunk/AST/Sema.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/cfe/trunk/AST/Sema.cpp
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: cfe/cfe/trunk/Driver/PrintParserCallbacks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Driver/PrintParserCallbacks.cpp?rev=38933&view=auto
==============================================================================
--- cfe/cfe/trunk/Driver/PrintParserCallbacks.cpp (added)
+++ cfe/cfe/trunk/Driver/PrintParserCallbacks.cpp Wed Jul 11 11:25:55 2007
@@ -0,0 +1,57 @@
+//===--- PrintParserActions.cpp - Implement -parse-print-callbacks mode ---===//
+//
+// 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 code simply runs the preprocessor on the input file and prints out the
+// result. This is the traditional behavior of the -E option.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang.h"
+#include "clang/Lex/IdentifierTable.h"
+#include "clang/Parse/Action.h"
+#include "clang/Parse/Declarations.h"
+#include <iostream>
+
+using namespace llvm;
+using namespace clang;
+
+namespace {
+ class ParserPrintActions : public EmptyAction {
+
+ /// ParseDeclarator - This callback is invoked when a declarator is parsed and
+ /// 'Init' specifies the initializer if any. This is for things like:
+ /// "int X = 4" or "typedef int foo".
+ virtual void ParseDeclarator(SourceLocation Loc, Scope *S, Declarator &D,
+ ExprTy *Init) {
+ std::cout << "ParseDeclarator ";
+ if (IdentifierInfo *II = D.getIdentifier()) {
+ std::cout << "'" << II->getName() << "'";
+ } else {
+ std::cout << "<anon>";
+ }
+ std::cout << "\n";
+
+ // Pass up to EmptyActions so that the symbol table is maintained right.
+ EmptyAction::ParseDeclarator(Loc, S, D, Init);
+ }
+
+ /// PopScope - This callback is called immediately before the specified scope
+ /// is popped and deleted.
+ virtual void PopScope(SourceLocation Loc, Scope *S) {
+ std::cout << "PopScope\n";
+
+ // Pass up to EmptyActions so that the symbol table is maintained right.
+ EmptyAction::PopScope(Loc, S);
+ }
+ };
+}
+
+Action *llvm::clang::CreatePrintParserActionsAction() {
+ return new ParserPrintActions();
+}
Propchange: cfe/cfe/trunk/Driver/PrintParserCallbacks.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/cfe/trunk/Driver/PrintParserCallbacks.cpp
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: cfe/cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Driver/clang.cpp?rev=38933&r1=38932&r2=38933&view=diff
==============================================================================
--- cfe/cfe/trunk/Driver/clang.cpp (original)
+++ cfe/cfe/trunk/Driver/clang.cpp Wed Jul 11 11:25:55 2007
@@ -23,6 +23,7 @@
//===----------------------------------------------------------------------===//
#include "clang.h"
+#include "clang/AST/AST.h"
#include "clang/Parse/Parser.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/FileManager.h"
@@ -47,9 +48,10 @@
Stats("stats", cl::desc("Print performance metrics and statistics"));
enum ProgActions {
+ ParseSyntaxOnly, // Parse and perform semantic analysis.
+ ParsePrintASTs, // Parse and print raw ASTs.
ParsePrintCallbacks, // Parse and print each callback.
ParseNoop, // Parse with noop callbacks.
- ParseSyntaxOnly, // Parse and perform semantic analysis.
RunPreprocessorOnly, // Just lex, no output.
PrintPreprocessedInput, // -E mode.
DumpTokens // Token dump mode.
@@ -57,7 +59,7 @@
static cl::opt<ProgActions>
ProgAction(cl::desc("Choose output type:"), cl::ZeroOrMore,
- cl::init(ParseSyntaxOnly),
+ cl::init(ParsePrintASTs),
cl::values(
clEnumValN(RunPreprocessorOnly, "Eonly",
"Just run preprocessor, no output (for timings)"),
@@ -65,13 +67,14 @@
"Run preprocessor, emit preprocessed file"),
clEnumValN(DumpTokens, "dumptokens",
"Run preprocessor, dump internal rep of tokens"),
- clEnumValN(ParseSyntaxOnly, "fsyntax-only",
- "Run parser and perform semantic analysis"),
- clEnumValN(ParsePrintCallbacks, "parse-print-callbacks",
- "Run parser and print each callback invoked"),
clEnumValN(ParseNoop, "parse-noop",
"Run parser with noop callbacks (for timings)"),
- // TODO: NULL PARSER.
+ clEnumValN(ParsePrintCallbacks, "parse-print-callbacks",
+ "Run parser and print each callback invoked"),
+ clEnumValN(ParsePrintASTs, "parse-print-ast",
+ "Run parser and print raw ASTs"),
+ clEnumValN(ParseSyntaxOnly, "fsyntax-only",
+ "Run parser and perform semantic analysis"),
clEnumValEnd));
@@ -748,8 +751,13 @@
break;
case ParseNoop: // -parse-noop
+ ParseFile(PP, new EmptyAction(), MainFileID);
+ break;
case ParsePrintCallbacks:
- //ParseFile(PP, new ParserPrintActions(PP), MainFileID);
+ ParseFile(PP, CreatePrintParserActionsAction(), MainFileID);
+ break;
+ case ParsePrintASTs:
+ //
break;
case ParseSyntaxOnly: // -fsyntax-only
ParseFile(PP, new EmptyAction(), MainFileID);
Modified: cfe/cfe/trunk/Driver/clang.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Driver/clang.h?rev=38933&r1=38932&r2=38933&view=diff
==============================================================================
--- cfe/cfe/trunk/Driver/clang.h (original)
+++ cfe/cfe/trunk/Driver/clang.h Wed Jul 11 11:25:55 2007
@@ -18,11 +18,16 @@
namespace clang {
class Preprocessor;
class LangOptions;
+class Action;
/// DoPrintPreprocessedInput - Implement -E mode.
void DoPrintPreprocessedInput(unsigned MainFileID, Preprocessor &PP,
LangOptions &Options);
+/// CreatePrintParserActionsAction - Return the actions implementation that
+/// implements the -parse-print-callbacks option.
+Action *CreatePrintParserActionsAction();
+
} // end namespace clang
} // end namespace llvm
Modified: cfe/cfe/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Makefile?rev=38933&r1=38932&r2=38933&view=diff
==============================================================================
--- cfe/cfe/trunk/Makefile (original)
+++ cfe/cfe/trunk/Makefile Wed Jul 11 11:25:55 2007
@@ -1,5 +1,5 @@
LEVEL = ../..
-PARALLEL_DIRS := Basic Lex Parse
+PARALLEL_DIRS := Basic Lex Parse AST
CPPFLAGS += -I$(LEVEL)/tools/clang/include
CXXFLAGS = -fno-rtti -fno-exceptions
Modified: cfe/cfe/trunk/Parse/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Parse/Makefile?rev=38933&r1=38932&r2=38933&view=diff
==============================================================================
--- cfe/cfe/trunk/Parse/Makefile (original)
+++ cfe/cfe/trunk/Parse/Makefile Wed Jul 11 11:25:55 2007
@@ -7,7 +7,7 @@
#
##===----------------------------------------------------------------------===##
#
-# This implements the Lexer library for the C-Language front-end.
+# This implements the Parser library for the C-Language front-end.
#
##===----------------------------------------------------------------------===##
Added: cfe/cfe/trunk/Sema/Sema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/Sema.cpp?rev=38933&view=auto
==============================================================================
--- cfe/cfe/trunk/Sema/Sema.cpp (added)
+++ cfe/cfe/trunk/Sema/Sema.cpp Wed Jul 11 11:25:55 2007
@@ -0,0 +1,15 @@
+//===--- Builder.cpp - AST Builder Implementation -------------------------===//
+//
+// 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 implements the actions class which builds an AST out of a parse
+// stream.
+//
+//===----------------------------------------------------------------------===//
+
+int xx;
\ No newline at end of file
Propchange: cfe/cfe/trunk/Sema/Sema.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/cfe/trunk/Sema/Sema.cpp
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: cfe/cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=38933&r1=38932&r2=38933&view=diff
==============================================================================
--- cfe/cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/cfe/trunk/clang.xcodeproj/project.pbxproj Wed Jul 11 11:25:55 2007
@@ -10,7 +10,6 @@
DE06B73E0A8307640050E87E /* LangOptions.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06B73D0A8307640050E87E /* LangOptions.h */; };
DE06BEC90A854E390050E87E /* Scope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06BEC80A854E390050E87E /* Scope.cpp */; };
DE06BECB0A854E4B0050E87E /* Scope.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06BECA0A854E4B0050E87E /* Scope.h */; };
- DE06BEF40A8558200050E87E /* Decl.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06BEF30A8558200050E87E /* Decl.h */; };
DE06CC180A899E110050E87E /* Statement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06CC170A899E110050E87E /* Statement.cpp */; };
DE06CEC00A8AE7800050E87E /* Expression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06CEBF0A8AE7800050E87E /* Expression.cpp */; };
DE06D4300A8BB52D0050E87E /* DeclarationSemantics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06D42E0A8BB52D0050E87E /* DeclarationSemantics.cpp */; };
@@ -24,6 +23,10 @@
DEAEECAD0A5AF0E30045101B /* clang.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEAEECAC0A5AF0E30045101B /* clang.h */; };
DEAEECD50A5AF1FE0045101B /* PrintPreprocessedOutput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEAEECD40A5AF1FE0045101B /* PrintPreprocessedOutput.cpp */; };
DEAEED4B0A5AF89A0045101B /* NOTES.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEAEED4A0A5AF89A0045101B /* NOTES.txt */; };
+ DEC8D9910A9433CD00353FCA /* Decl.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEC8D9900A9433CD00353FCA /* Decl.h */; };
+ DEC8D9A40A94346E00353FCA /* AST.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEC8D9A30A94346E00353FCA /* AST.h */; };
+ DEC8D9B60A9434FA00353FCA /* Builder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEC8D9B50A9434FA00353FCA /* Builder.cpp */; };
+ DEC8DA1E0A94388B00353FCA /* PrintParserCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEC8DA1D0A94388B00353FCA /* PrintParserCallbacks.cpp */; };
DED7D72D0A524281003AD0FB /* clang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D72C0A524281003AD0FB /* clang.cpp */; };
DED7D7410A524295003AD0FB /* Diagnostic.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7310A524295003AD0FB /* Diagnostic.h */; };
DED7D7420A524295003AD0FB /* DiagnosticKinds.def in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7320A524295003AD0FB /* DiagnosticKinds.def */; };
@@ -103,19 +106,19 @@
DE1F24820A7DCD3800FBF588 /* Declarations.h in CopyFiles */,
DE06B73E0A8307640050E87E /* LangOptions.h in CopyFiles */,
DE06BECB0A854E4B0050E87E /* Scope.h in CopyFiles */,
- DE06BEF40A8558200050E87E /* Decl.h in CopyFiles */,
DE06E8140A8FF9330050E87E /* Action.h in CopyFiles */,
+ DEC8D9910A9433CD00353FCA /* Decl.h in CopyFiles */,
+ DEC8D9A40A94346E00353FCA /* AST.h in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
- 8DD76F6C0486A84900D96B5E /* clang */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = clang; sourceTree = BUILT_PRODUCTS_DIR; };
+ 8DD76F6C0486A84900D96B5E /* clang */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = clang; sourceTree = BUILT_PRODUCTS_DIR; };
DE06B73D0A8307640050E87E /* LangOptions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LangOptions.h; sourceTree = "<group>"; };
DE06BEC80A854E390050E87E /* Scope.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Scope.cpp; path = Parse/Scope.cpp; sourceTree = "<group>"; };
DE06BECA0A854E4B0050E87E /* Scope.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Scope.h; path = clang/Parse/Scope.h; sourceTree = "<group>"; };
- DE06BEF30A8558200050E87E /* Decl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Decl.h; path = clang/Parse/Decl.h; sourceTree = "<group>"; };
DE06CC170A899E110050E87E /* Statement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Statement.cpp; path = Parse/Statement.cpp; sourceTree = "<group>"; };
DE06CEBF0A8AE7800050E87E /* Expression.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Expression.cpp; path = Parse/Expression.cpp; sourceTree = "<group>"; };
DE06D42E0A8BB52D0050E87E /* DeclarationSemantics.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DeclarationSemantics.cpp; path = Parse/DeclarationSemantics.cpp; sourceTree = "<group>"; };
@@ -129,6 +132,10 @@
DEAEECAC0A5AF0E30045101B /* clang.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = clang.h; sourceTree = "<group>"; };
DEAEECD40A5AF1FE0045101B /* PrintPreprocessedOutput.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PrintPreprocessedOutput.cpp; sourceTree = "<group>"; };
DEAEED4A0A5AF89A0045101B /* NOTES.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = NOTES.txt; sourceTree = "<group>"; };
+ DEC8D9900A9433CD00353FCA /* Decl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Decl.h; path = clang/AST/Decl.h; sourceTree = "<group>"; };
+ DEC8D9A30A94346E00353FCA /* AST.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AST.h; path = clang/AST/AST.h; sourceTree = "<group>"; };
+ DEC8D9B50A9434FA00353FCA /* Builder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Builder.cpp; path = AST/Builder.cpp; sourceTree = "<group>"; };
+ DEC8DA1D0A94388B00353FCA /* PrintParserCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PrintParserCallbacks.cpp; sourceTree = "<group>"; };
DED7D72C0A524281003AD0FB /* clang.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = clang.cpp; sourceTree = "<group>"; };
DED7D7310A524295003AD0FB /* Diagnostic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Diagnostic.h; sourceTree = "<group>"; };
DED7D7320A524295003AD0FB /* DiagnosticKinds.def */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = DiagnosticKinds.def; sourceTree = "<group>"; };
@@ -191,6 +198,7 @@
DED7D7500A5242C7003AD0FB /* Basic */,
DED7D78C0A5242E6003AD0FB /* Lex */,
DE1F22600A7D8C9B00FBF588 /* Parse */,
+ DEC8D9920A9433F400353FCA /* AST */,
);
name = Source;
sourceTree = "<group>";
@@ -217,7 +225,6 @@
children = (
DE06E8130A8FF9330050E87E /* Action.h */,
DE1F24810A7DCD3800FBF588 /* Declarations.h */,
- DE06BEF30A8558200050E87E /* Decl.h */,
DE1F22020A7D852A00FBF588 /* Parser.h */,
DE06BECA0A854E4B0050E87E /* Scope.h */,
);
@@ -244,16 +251,35 @@
DED7D72C0A524281003AD0FB /* clang.cpp */,
DEAEECAC0A5AF0E30045101B /* clang.h */,
DEAEECD40A5AF1FE0045101B /* PrintPreprocessedOutput.cpp */,
+ DEC8DA1D0A94388B00353FCA /* PrintParserCallbacks.cpp */,
);
name = Driver;
sourceTree = "<group>";
};
+ DEC8D98B0A9433BC00353FCA /* AST */ = {
+ isa = PBXGroup;
+ children = (
+ DEC8D9A30A94346E00353FCA /* AST.h */,
+ DEC8D9900A9433CD00353FCA /* Decl.h */,
+ );
+ name = AST;
+ sourceTree = "<group>";
+ };
+ DEC8D9920A9433F400353FCA /* AST */ = {
+ isa = PBXGroup;
+ children = (
+ DEC8D9B50A9434FA00353FCA /* Builder.cpp */,
+ );
+ name = AST;
+ sourceTree = "<group>";
+ };
DED7D72E0A524295003AD0FB /* include */ = {
isa = PBXGroup;
children = (
DED7D7300A524295003AD0FB /* Basic */,
DED7D7390A524295003AD0FB /* Lex */,
DE1F21F20A7D84E800FBF588 /* Parse */,
+ DEC8D98B0A9433BC00353FCA /* AST */,
);
path = include;
sourceTree = "<group>";
@@ -390,6 +416,8 @@
DE06D4310A8BB52D0050E87E /* Parser.cpp in Sources */,
DE06D4410A8BB55C0050E87E /* Declaration.cpp in Sources */,
DE06E4D70A8FBF7A0050E87E /* Initializer.cpp in Sources */,
+ DEC8D9B60A9434FA00353FCA /* Builder.cpp in Sources */,
+ DEC8DA1E0A94388B00353FCA /* PrintParserCallbacks.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Added: cfe/cfe/trunk/include/clang/AST/AST.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/AST/AST.h?rev=38933&view=auto
==============================================================================
--- cfe/cfe/trunk/include/clang/AST/AST.h (added)
+++ cfe/cfe/trunk/include/clang/AST/AST.h Wed Jul 11 11:25:55 2007
@@ -0,0 +1,27 @@
+//===--- AST.h - "Umbrella" header for AST library --------------*- 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 interface to the AST classes.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_AST_AST_H
+#define LLVM_CLANG_AST_AST_H
+
+namespace llvm {
+namespace clang {
+
+ class Action;
+
+
+
+} // end namespace clang
+} // end namespace llvm
+
+#endif
Propchange: cfe/cfe/trunk/include/clang/AST/AST.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/cfe/trunk/include/clang/AST/AST.h
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: cfe/cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/AST/Decl.h?rev=38933&r1=38932&r2=38933&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/cfe/trunk/include/clang/AST/Decl.h Wed Jul 11 11:25:55 2007
@@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_PARSE_DECL_H
-#define LLVM_CLANG_PARSE_DECL_H
+#ifndef LLVM_CLANG_AST_DECL_H
+#define LLVM_CLANG_AST_DECL_H
#include "clang/ADT/SourceLocation.h"
Modified: cfe/cfe/trunk/include/clang/Parse/Action.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Parse/Action.h?rev=38933&r1=38932&r2=38933&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/cfe/trunk/include/clang/Parse/Action.h Wed Jul 11 11:25:55 2007
@@ -23,6 +23,8 @@
// Parse.
class Scope;
class Action;
+ // Lex.
+ class IdentifierInfo;
/// Action - As the parser reads the input file and recognizes the productions
/// of the grammar, it invokes methods on this class to turn the parsed input
@@ -71,7 +73,7 @@
/// useful to subclass if clients want to implement some actions without having
/// to reimplement all of the scoping rules.
class EmptyAction : public Action {
-
+public:
/// isTypedefName - This looks at the IdentifierInfo::FETokenInfo field to
/// determine whether the name is a typedef or not in this scope.
virtual bool isTypedefName(const IdentifierInfo &II, Scope *S) const;
More information about the cfe-commits
mailing list