summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/AST/Decl.h21
-rw-r--r--clang/include/clang/Frontend/PCHBitCodes.h6
-rw-r--r--clang/include/clang/Frontend/PCHReader.h4
3 files changed, 23 insertions, 8 deletions
diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index 03ef88a0ec2..dffc0ad6e46 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/include/clang/AST/Decl.h
@@ -510,10 +510,12 @@ private:
Expr *DefArg)
: ParmVarDecl(OriginalParmVar, DC, L, Id, T, S, DefArg), OriginalType(OT) {}
public:
- static OriginalParmVarDecl *Create(ASTContext &C, DeclContext *DC,
- SourceLocation L,IdentifierInfo *Id,
- QualType T, QualType OT,
- StorageClass S, Expr *DefArg);
+ static OriginalParmVarDecl *Create(ASTContext &C, DeclContext *DC,
+ SourceLocation L,IdentifierInfo *Id,
+ QualType T, QualType OT,
+ StorageClass S, Expr *DefArg);
+
+ void setOriginalType(QualType T) { OriginalType = T; }
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return D->getKind() == OriginalParmVar; }
@@ -603,6 +605,7 @@ public:
SourceLocation TSStartLoc = SourceLocation());
SourceLocation getTypeSpecStartLoc() const { return TypeSpecStartLoc; }
+ void setTypeSpecStartLoc(SourceLocation TS) { TypeSpecStartLoc = TS; }
/// getBody - Retrieve the body (definition) of the function. The
/// function body might be in any of the (re-)declarations of this
@@ -629,23 +632,24 @@ public:
/// Whether this function is virtual, either by explicit marking, or by
/// overriding a virtual function. Only valid on C++ member functions.
bool isVirtual() { return IsVirtual; }
- void setVirtual() { IsVirtual = true; }
+ void setVirtual(bool V = true) { IsVirtual = V; }
/// Whether this virtual function is pure, i.e. makes the containing class
/// abstract.
bool isPure() const { return IsPure; }
- void setPure() { IsPure = true; }
+ void setPure(bool P = true) { IsPure = P; }
/// \brief Whether this function has a prototype, either because one
/// was explicitly written or because it was "inherited" by merging
/// a declaration without a prototype with a declaration that has a
/// prototype.
bool hasPrototype() const { return HasPrototype || InheritedPrototype; }
+ void setHasPrototype(bool P) { HasPrototype = P; }
/// \brief Whether this function inherited its prototype from a
/// previous declaration.
bool inheritedPrototype() const { return InheritedPrototype; }
- void setInheritedPrototype() { InheritedPrototype = true; }
+ void setInheritedPrototype(bool P = true) { InheritedPrototype = P; }
/// \brief Whether this function has been deleted.
///
@@ -666,7 +670,7 @@ public:
/// };
/// @endcode
bool isDeleted() const { return IsDeleted; }
- void setDeleted() { IsDeleted = true; }
+ void setDeleted(bool D = true) { IsDeleted = D; }
/// \brief Determines whether this is a function "main", which is
/// the entry point into an executable program.
@@ -726,6 +730,7 @@ public:
void setStorageClass(StorageClass SC) { SClass = SC; }
bool isInline() const { return IsInline; }
+ void setInline(bool I) { IsInline = I; }
/// isOverloadedOperator - Whether this function declaration
/// represents an C++ overloaded operator, e.g., "operator+".
diff --git a/clang/include/clang/Frontend/PCHBitCodes.h b/clang/include/clang/Frontend/PCHBitCodes.h
index 14c59712ece..e1303056f88 100644
--- a/clang/include/clang/Frontend/PCHBitCodes.h
+++ b/clang/include/clang/Frontend/PCHBitCodes.h
@@ -320,10 +320,16 @@ namespace clang {
DECL_RECORD,
/// \brief An EnumConstantDecl record.
DECL_ENUM_CONSTANT,
+ /// \brief A FunctionDecl record.
+ DECL_FUNCTION,
/// \brief A FieldDecl record.
DECL_FIELD,
/// \brief A VarDecl record.
DECL_VAR,
+ /// \brief A ParmVarDecl record.
+ DECL_PARM_VAR,
+ /// \brief An OriginalParmVarDecl record.
+ DECL_ORIGINAL_PARM_VAR,
/// \brief A record that stores the set of declarations that are
/// lexically stored within a given DeclContext.
///
diff --git a/clang/include/clang/Frontend/PCHReader.h b/clang/include/clang/Frontend/PCHReader.h
index 3490cb50708..6b67f2ef304 100644
--- a/clang/include/clang/Frontend/PCHReader.h
+++ b/clang/include/clang/Frontend/PCHReader.h
@@ -209,6 +209,10 @@ public:
/// \brief Read a signed integral value
llvm::APSInt ReadAPSInt(const RecordData &Record, unsigned &Idx);
+
+ /// \brief Retrieve the AST context that this PCH reader
+ /// supplements.
+ ASTContext &getContext() { return Context; }
};
} // end namespace clang
OpenPOWER on IntegriCloud