[PATCH] D75560: Make Decl:: setOwningModuleID() public. (NFC)
Adrian Prantl via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 11 15:57:45 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2b366e75d413: Make Decl::setOwningModuleID() public. (NFC) (authored by aprantl).
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75560/new/
https://reviews.llvm.org/D75560
Files:
clang/include/clang/AST/Decl.h
clang/include/clang/AST/DeclBase.h
clang/include/clang/AST/DeclCXX.h
clang/include/clang/AST/DeclTemplate.h
Index: clang/include/clang/AST/DeclTemplate.h
===================================================================
--- clang/include/clang/AST/DeclTemplate.h
+++ clang/include/clang/AST/DeclTemplate.h
@@ -1891,6 +1891,10 @@
return *TemplateArgs;
}
+ void setTemplateArgs(TemplateArgumentList *Args) {
+ TemplateArgs = Args;
+ }
+
/// Determine the kind of specialization that this
/// declaration represents.
TemplateSpecializationKind getSpecializationKind() const {
Index: clang/include/clang/AST/DeclCXX.h
===================================================================
--- clang/include/clang/AST/DeclCXX.h
+++ clang/include/clang/AST/DeclCXX.h
@@ -2722,8 +2722,6 @@
ExplicitSpecifier ExplicitSpec;
- void setExplicitSpecifier(ExplicitSpecifier ES) { ExplicitSpec = ES; }
-
public:
friend class ASTDeclReader;
friend class ASTDeclWriter;
@@ -2745,6 +2743,7 @@
/// Return true if the declartion is already resolved to be explicit.
bool isExplicit() const { return getExplicitSpecifier().isExplicit(); }
+ void setExplicitSpecifier(ExplicitSpecifier ES) { ExplicitSpec = ES; }
/// Returns the type that this conversion function is converting to.
QualType getConversionType() const {
Index: clang/include/clang/AST/DeclBase.h
===================================================================
--- clang/include/clang/AST/DeclBase.h
+++ clang/include/clang/AST/DeclBase.h
@@ -626,7 +626,16 @@
setModuleOwnershipKind(ModuleOwnershipKind::ModulePrivate);
}
- /// Set the owning module ID.
+public:
+ /// Set the FromASTFile flag. This indicates that this declaration
+ /// was deserialized and not parsed from source code and enables
+ /// features such as module ownership information.
+ void setFromASTFile() {
+ FromASTFile = true;
+ }
+
+ /// Set the owning module ID. This may only be called for
+ /// deserialized Decls.
void setOwningModuleID(unsigned ID) {
assert(isFromASTFile() && "Only works on a deserialized declaration");
*((unsigned*)this - 2) = ID;
Index: clang/include/clang/AST/Decl.h
===================================================================
--- clang/include/clang/AST/Decl.h
+++ clang/include/clang/AST/Decl.h
@@ -3539,6 +3539,7 @@
/// negative enumerators of this enum. (see getNumNegativeBits)
void setNumNegativeBits(unsigned Num) { EnumDeclBits.NumNegativeBits = Num; }
+public:
/// True if this tag declaration is a scoped enumeration. Only
/// possible in C++11 mode.
void setScoped(bool Scoped = true) { EnumDeclBits.IsScoped = Scoped; }
@@ -3555,6 +3556,7 @@
/// Microsoft-style enumeration with a fixed underlying type.
void setFixed(bool Fixed = true) { EnumDeclBits.IsFixed = Fixed; }
+private:
/// True if a valid hash is stored in ODRHash.
bool hasODRHash() const { return EnumDeclBits.HasODRHash; }
void setHasODRHash(bool Hash = true) { EnumDeclBits.HasODRHash = Hash; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75560.249787.patch
Type: text/x-patch
Size: 2944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200311/970c0226/attachment.bin>
More information about the cfe-commits
mailing list