From 7e0fe4458c0ca3a49d15e8ffa68de06322e6c43a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 11 Apr 2009 18:48:18 +0000 Subject: sink abstract typedefs like Action::ExprTy from the Action class down to the ActionBase class. This eliminates dependencies of (e.g.) DeclSpec.h on Action.h, meaning that action.h can now include these headers and use their types directly in the actions interfaces. This is a refactoring to support a future change, no functionality change. llvm-svn: 68869 --- clang/lib/Parse/AttributeList.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'clang/lib/Parse/AttributeList.cpp') diff --git a/clang/lib/Parse/AttributeList.cpp b/clang/lib/Parse/AttributeList.cpp index 14011e5b6f1..d69755df73d 100644 --- a/clang/lib/Parse/AttributeList.cpp +++ b/clang/lib/Parse/AttributeList.cpp @@ -12,11 +12,12 @@ //===----------------------------------------------------------------------===// #include "clang/Parse/AttributeList.h" +#include "clang/Basic/IdentifierTable.h" using namespace clang; AttributeList::AttributeList(IdentifierInfo *aName, SourceLocation aLoc, IdentifierInfo *pName, SourceLocation pLoc, - Action::ExprTy **ExprList, unsigned numArgs, + ActionBase::ExprTy **ExprList, unsigned numArgs, AttributeList *n) : AttrName(aName), AttrLoc(aLoc), ParmName(pName), ParmLoc(pLoc), NumArgs(numArgs), Next(n) { @@ -24,7 +25,7 @@ AttributeList::AttributeList(IdentifierInfo *aName, SourceLocation aLoc, if (numArgs == 0) Args = 0; else { - Args = new Action::ExprTy*[numArgs]; + Args = new ActionBase::ExprTy*[numArgs]; memcpy(Args, ExprList, numArgs*sizeof(Args[0])); } } @@ -32,7 +33,7 @@ AttributeList::AttributeList(IdentifierInfo *aName, SourceLocation aLoc, AttributeList::~AttributeList() { if (Args) { // FIXME: before we delete the vector, we need to make sure the Expr's - // have been deleted. Since Action::ExprTy is "void", we are dependent + // have been deleted. Since ActionBase::ExprTy is "void", we are dependent // on the actions module for actually freeing the memory. The specific // hooks are ActOnDeclarator, ActOnTypeName, ActOnParamDeclaratorType, // ParseField, ParseTag. Once these routines have freed the expression, -- cgit v1.2.3