[cfe-commits] r39186 - in /cfe/cfe/trunk: AST/SemaDecl.cpp AST/SemaType.cpp Sema/SemaDecl.cpp Sema/SemaType.cpp include/clang/AST/Decl.h
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:40:46 PDT 2007
Author: sabre
Date: Wed Jul 11 11:40:46 2007
New Revision: 39186
URL: http://llvm.org/viewvc/llvm-project?rev=39186&view=rev
Log:
remove #include of clang/Parse/DeclSpec.h from clang/AST/Decl.h
Modified:
cfe/cfe/trunk/AST/SemaDecl.cpp
cfe/cfe/trunk/AST/SemaType.cpp
cfe/cfe/trunk/Sema/SemaDecl.cpp
cfe/cfe/trunk/Sema/SemaType.cpp
cfe/cfe/trunk/include/clang/AST/Decl.h
Modified: cfe/cfe/trunk/AST/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/SemaDecl.cpp?rev=39186&r1=39185&r2=39186&view=diff
==============================================================================
--- cfe/cfe/trunk/AST/SemaDecl.cpp (original)
+++ cfe/cfe/trunk/AST/SemaDecl.cpp Wed Jul 11 11:40:46 2007
@@ -14,6 +14,7 @@
#include "Sema.h"
#include "clang/AST/Decl.h"
#include "clang/AST/Type.h"
+#include "clang/Parse/DeclSpec.h"
#include "clang/Parse/Scope.h"
#include "clang/Lex/IdentifierTable.h"
using namespace llvm;
@@ -22,8 +23,6 @@
bool Sema::isTypeName(const IdentifierInfo &II, Scope *S) const {
Decl *D = II.getFETokenInfo<Decl>();
-
-
return D != 0 && isa<TypeDecl>(D);
}
@@ -76,9 +75,9 @@
if (D.getDeclSpec().StorageClassSpec == DeclSpec::SCS_typedef) {
New = ParseTypedefDecl(S, D, PrevDecl);
} else if (D.isFunctionDeclarator())
- New = new FunctionDecl(II, D.getDeclSpec(), PrevDecl);
+ New = new FunctionDecl(II, PrevDecl);
else
- New = new VarDecl(II, D.getDeclSpec(), PrevDecl);
+ New = new VarDecl(II, PrevDecl);
if (!New) return 0;
@@ -112,6 +111,6 @@
Decl *Sema::ParseTypedefDecl(Scope *S, Declarator &D, Decl *PrevDecl) {
assert(D.getIdentifier() && "Wrong callback for declspec withotu declarator");
- return new TypedefDecl(D.getIdentifier(), D.getDeclSpec(), PrevDecl);
+ return new TypedefDecl(D.getIdentifier(), PrevDecl);
}
Modified: cfe/cfe/trunk/AST/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/SemaType.cpp?rev=39186&r1=39185&r2=39186&view=diff
==============================================================================
--- cfe/cfe/trunk/AST/SemaType.cpp (original)
+++ cfe/cfe/trunk/AST/SemaType.cpp Wed Jul 11 11:40:46 2007
@@ -14,6 +14,7 @@
#include "Sema.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
+#include "clang/Parse/DeclSpec.h"
using namespace llvm;
using namespace clang;
Modified: cfe/cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/SemaDecl.cpp?rev=39186&r1=39185&r2=39186&view=diff
==============================================================================
--- cfe/cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/cfe/trunk/Sema/SemaDecl.cpp Wed Jul 11 11:40:46 2007
@@ -14,6 +14,7 @@
#include "Sema.h"
#include "clang/AST/Decl.h"
#include "clang/AST/Type.h"
+#include "clang/Parse/DeclSpec.h"
#include "clang/Parse/Scope.h"
#include "clang/Lex/IdentifierTable.h"
using namespace llvm;
@@ -22,8 +23,6 @@
bool Sema::isTypeName(const IdentifierInfo &II, Scope *S) const {
Decl *D = II.getFETokenInfo<Decl>();
-
-
return D != 0 && isa<TypeDecl>(D);
}
@@ -76,9 +75,9 @@
if (D.getDeclSpec().StorageClassSpec == DeclSpec::SCS_typedef) {
New = ParseTypedefDecl(S, D, PrevDecl);
} else if (D.isFunctionDeclarator())
- New = new FunctionDecl(II, D.getDeclSpec(), PrevDecl);
+ New = new FunctionDecl(II, PrevDecl);
else
- New = new VarDecl(II, D.getDeclSpec(), PrevDecl);
+ New = new VarDecl(II, PrevDecl);
if (!New) return 0;
@@ -112,6 +111,6 @@
Decl *Sema::ParseTypedefDecl(Scope *S, Declarator &D, Decl *PrevDecl) {
assert(D.getIdentifier() && "Wrong callback for declspec withotu declarator");
- return new TypedefDecl(D.getIdentifier(), D.getDeclSpec(), PrevDecl);
+ return new TypedefDecl(D.getIdentifier(), PrevDecl);
}
Modified: cfe/cfe/trunk/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/SemaType.cpp?rev=39186&r1=39185&r2=39186&view=diff
==============================================================================
--- cfe/cfe/trunk/Sema/SemaType.cpp (original)
+++ cfe/cfe/trunk/Sema/SemaType.cpp Wed Jul 11 11:40:46 2007
@@ -14,6 +14,7 @@
#include "Sema.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
+#include "clang/Parse/DeclSpec.h"
using namespace llvm;
using namespace clang;
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=39186&r1=39185&r2=39186&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/cfe/trunk/include/clang/AST/Decl.h Wed Jul 11 11:40:46 2007
@@ -15,7 +15,6 @@
#define LLVM_CLANG_AST_DECL_H
#include "clang/Basic/SourceLocation.h"
-#include "clang/Parse/DeclSpec.h" // FIXME: Eliminate.
namespace llvm {
namespace clang {
@@ -36,11 +35,6 @@
/// variable, the tag for a struct).
IdentifierInfo *Identifier;
- /// DeclarationSpecifier - Information about storage class, type specifiers,
- /// etc. FIXME: This should be eliminated once we have fully converted types
- /// over.
- DeclSpec DeclarationSpecifier;
-
/// Type.
/// DeclKind - This indicates which class this is.
@@ -51,8 +45,8 @@
Decl *Next;
public:
- Decl(IdentifierInfo *Id, const DeclSpec &DS, Kind DK, Decl *next)
- : Identifier(Id), DeclarationSpecifier(DS), DeclKind(DK), Next(next) {}
+ Decl(IdentifierInfo *Id, Kind DK, Decl *next)
+ : Identifier(Id), DeclKind(DK), Next(next) {}
virtual ~Decl();
const IdentifierInfo *getIdentifier() const { return Identifier; }
@@ -69,8 +63,8 @@
/// Objective-C classes.
class TypeDecl : public Decl {
public:
- TypeDecl(IdentifierInfo *Id, const DeclSpec &DS, Kind DK, Decl *Next)
- : Decl(Id, DS, DK, Next) {}
+ TypeDecl(IdentifierInfo *Id, Kind DK, Decl *Next)
+ : Decl(Id, DK, Next) {}
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return D->getKind() == Typedef; }
@@ -80,8 +74,8 @@
class TypedefDecl : public TypeDecl {
public:
// FIXME: Remove Declarator argument.
- TypedefDecl(IdentifierInfo *Id, const DeclSpec &DS, Decl *Next)
- : TypeDecl(Id, DS, Typedef, Next) {}
+ TypedefDecl(IdentifierInfo *Id, Decl *Next)
+ : TypeDecl(Id, Typedef, Next) {}
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return D->getKind() == Typedef; }
@@ -94,8 +88,8 @@
// Args etc.
Stmt *Body; // Null if a prototype.
public:
- FunctionDecl(IdentifierInfo *Id, const DeclSpec &DS, Decl *Next)
- : Decl(Id, DS, Function, Next), Body(0) {}
+ FunctionDecl(IdentifierInfo *Id, Decl *Next)
+ : Decl(Id, Function, Next), Body(0) {}
Stmt *getBody() const { return Body; }
void setBody(Stmt *B) { Body = B; }
@@ -111,8 +105,8 @@
class VarDecl : public Decl {
// Initializer.
public:
- VarDecl(IdentifierInfo *Id, const DeclSpec &DS, Decl *Next)
- : Decl(Id, DS, Variable, Next) {}
+ VarDecl(IdentifierInfo *Id, Decl *Next)
+ : Decl(Id, Variable, Next) {}
// Implement isa/cast/dyncast/etc.
More information about the cfe-commits
mailing list