void VarDecl::EmitInRec(Serializer& S) const {
ValueDecl::EmitInRec(S);
S.EmitInt(getStorageClass()); // From VarDecl.
- S.EmitInt(getObjcDeclQualifier()); // From VarDecl.
+ // FIXME: This is now in ParmVarDecl
+ // S.EmitInt(getObjcDeclQualifier()); // From VarDecl.
}
void VarDecl::ReadInRec(Deserializer& D) {
ValueDecl::ReadInRec(D);
- SClass = static_cast<StorageClass>(D.ReadInt()); // From VarDecl.
- objcDeclQualifier = static_cast<ObjcDeclQualifier>(D.ReadInt()); // VarDecl.
+ SClass = static_cast<StorageClass>(D.ReadInt()); // From VarDecl.
+ // FIXME: This is now in ParmVarDecl
+ // objcDeclQualifier = static_cast<ObjcDeclQualifier>(D.ReadInt()); // VarDecl.
}
//===------------------------------------------------------------===//
// as static variables declared within a function.
bool hasGlobalStorage() const { return !hasAutoStorage(); }
- ObjcDeclQualifier getObjcDeclQualifier() const { return objcDeclQualifier; }
- void setObjcDeclQualifier(ObjcDeclQualifier QTVal)
- { objcDeclQualifier = QTVal; }
-
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) {
return D->getKind() >= VarFirst && D->getKind() <= VarLast;
protected:
VarDecl(Kind DK, SourceLocation L, IdentifierInfo *Id, QualType T,
StorageClass SC, ScopedDecl *PrevDecl, AttributeList *A = 0)
- : ValueDecl(DK, L, Id, T, PrevDecl, A), Init(0),
- objcDeclQualifier(OBJC_TQ_None) { SClass = SC; }
+ : ValueDecl(DK, L, Id, T, PrevDecl, A), Init(0) { SClass = SC; }
private:
Expr *Init;
// FIXME: This can be packed into the bitfields in Decl.
unsigned SClass : 3;
- /// FIXME: Also can be paced into the bitfields in Decl.
- /// in, inout, etc.
- ObjcDeclQualifier objcDeclQualifier : 6;
-
+
friend class StmtIteratorBase;
protected:
public:
ParmVarDecl(SourceLocation L, IdentifierInfo *Id, QualType T, StorageClass S,
ScopedDecl *PrevDecl, AttributeList *A = 0)
- : VarDecl(ParmVar, L, Id, T, S, PrevDecl, A) {}
+ : VarDecl(ParmVar, L, Id, T, S, PrevDecl, A),
+ objcDeclQualifier(OBJC_TQ_None) {}
+ ObjcDeclQualifier getObjcDeclQualifier() const { return objcDeclQualifier; }
+ void setObjcDeclQualifier(ObjcDeclQualifier QTVal)
+ { objcDeclQualifier = QTVal; }
+
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return D->getKind() == ParmVar; }
static bool classof(const ParmVarDecl *D) { return true; }
+private:
+ /// FIXME: Also can be paced into the bitfields in Decl.
+ /// in, inout, etc.
+ ObjcDeclQualifier objcDeclQualifier : 6;
+
protected:
/// CreateImpl - Deserialize a ParmVarDecl. Called by Decl::Create.
static ParmVarDecl* CreateImpl(llvm::Deserializer& D);