@@ -606,7 +606,11 @@ class ASTReader
606606
607607 // / An array of lexical contents of a declaration context, as a sequence of
608608 // / Decl::Kind, DeclID pairs.
609- using LexicalContents = ArrayRef<llvm::support::unaligned_uint32_t >;
609+ using unalighed_decl_id_t =
610+ llvm::support::detail::packed_endian_specific_integral<
611+ serialization::DeclID, llvm::endianness::native,
612+ llvm::support::unaligned>;
613+ using LexicalContents = ArrayRef<unalighed_decl_id_t >;
610614
611615 // / Map from a DeclContext to its lexical contents.
612616 llvm::DenseMap<const DeclContext*, std::pair<ModuleFile*, LexicalContents>>
@@ -1093,8 +1097,8 @@ class ASTReader
10931097 // /
10941098 // / The declarations on the identifier chain for these identifiers will be
10951099 // / loaded once the recursive loading has completed.
1096- llvm::MapVector<IdentifierInfo *, SmallVector<uint32_t , 4 >>
1097- PendingIdentifierInfos;
1100+ llvm::MapVector<IdentifierInfo *, SmallVector<serialization::DeclID , 4 >>
1101+ PendingIdentifierInfos;
10981102
10991103 // / The set of lookup results that we have faked in order to support
11001104 // / merging of partially deserialized decls but that we have not yet removed.
@@ -1913,22 +1917,22 @@ class ASTReader
19131917 // / Resolve a declaration ID into a declaration, potentially
19141918 // / building a new declaration.
19151919 Decl *GetDecl (serialization::DeclID ID);
1916- Decl *GetExternalDecl (uint32_t ID) override ;
1920+ Decl *GetExternalDecl (serialization::DeclID ID) override ;
19171921
19181922 // / Resolve a declaration ID into a declaration. Return 0 if it's not
19191923 // / been loaded yet.
19201924 Decl *GetExistingDecl (serialization::DeclID ID);
19211925
19221926 // / Reads a declaration with the given local ID in the given module.
1923- Decl *GetLocalDecl (ModuleFile &F, uint32_t LocalID) {
1927+ Decl *GetLocalDecl (ModuleFile &F, serialization::DeclID LocalID) {
19241928 return GetDecl (getGlobalDeclID (F, LocalID));
19251929 }
19261930
19271931 // / Reads a declaration with the given local ID in the given module.
19281932 // /
19291933 // / \returns The requested declaration, casted to the given return type.
1930- template <typename T>
1931- T *GetLocalDeclAs (ModuleFile &F, uint32_t LocalID) {
1934+ template <typename T>
1935+ T *GetLocalDeclAs (ModuleFile &F, serialization::DeclID LocalID) {
19321936 return cast_or_null<T>(GetLocalDecl (F, LocalID));
19331937 }
19341938
@@ -2120,9 +2124,10 @@ class ASTReader
21202124 void LoadSelector (Selector Sel);
21212125
21222126 void SetIdentifierInfo (unsigned ID, IdentifierInfo *II);
2123- void SetGloballyVisibleDecls (IdentifierInfo *II,
2124- const SmallVectorImpl<uint32_t > &DeclIDs,
2125- SmallVectorImpl<Decl *> *Decls = nullptr );
2127+ void
2128+ SetGloballyVisibleDecls (IdentifierInfo *II,
2129+ const SmallVectorImpl<serialization::DeclID> &DeclIDs,
2130+ SmallVectorImpl<Decl *> *Decls = nullptr );
21262131
21272132 // / Report a diagnostic.
21282133 DiagnosticBuilder Diag (unsigned DiagID) const ;
0 commit comments