@@ -1781,26 +1781,26 @@ llvm::Error ASTReader::ReadBlockAbbrevs(BitstreamCursor &Cursor,
1781
1781
}
1782
1782
}
1783
1783
1784
- Token ASTReader::ReadToken (ModuleFile &F , const RecordDataImpl &Record,
1784
+ Token ASTReader::ReadToken (ModuleFile &M , const RecordDataImpl &Record,
1785
1785
unsigned &Idx) {
1786
1786
Token Tok;
1787
1787
Tok.startToken ();
1788
- Tok.setLocation (ReadSourceLocation (F , Record, Idx));
1788
+ Tok.setLocation (ReadSourceLocation (M , Record, Idx));
1789
1789
Tok.setKind ((tok::TokenKind)Record[Idx++]);
1790
1790
Tok.setFlag ((Token::TokenFlags)Record[Idx++]);
1791
1791
1792
1792
if (Tok.isAnnotation ()) {
1793
- Tok.setAnnotationEndLoc (ReadSourceLocation (F , Record, Idx));
1793
+ Tok.setAnnotationEndLoc (ReadSourceLocation (M , Record, Idx));
1794
1794
switch (Tok.getKind ()) {
1795
1795
case tok::annot_pragma_loop_hint: {
1796
1796
auto *Info = new (PP.getPreprocessorAllocator ()) PragmaLoopHintInfo;
1797
- Info->PragmaName = ReadToken (F , Record, Idx);
1798
- Info->Option = ReadToken (F , Record, Idx);
1797
+ Info->PragmaName = ReadToken (M , Record, Idx);
1798
+ Info->Option = ReadToken (M , Record, Idx);
1799
1799
unsigned NumTokens = Record[Idx++];
1800
1800
SmallVector<Token, 4 > Toks;
1801
1801
Toks.reserve (NumTokens);
1802
1802
for (unsigned I = 0 ; I < NumTokens; ++I)
1803
- Toks.push_back (ReadToken (F , Record, Idx));
1803
+ Toks.push_back (ReadToken (M , Record, Idx));
1804
1804
Info->Toks = llvm::ArrayRef (Toks).copy (PP.getPreprocessorAllocator ());
1805
1805
Tok.setAnnotationValue (static_cast <void *>(Info));
1806
1806
break ;
@@ -1811,7 +1811,7 @@ Token ASTReader::ReadToken(ModuleFile &F, const RecordDataImpl &Record,
1811
1811
auto SlotLabel = ReadString (Record, Idx);
1812
1812
Info->SlotLabel =
1813
1813
llvm::StringRef (SlotLabel).copy (PP.getPreprocessorAllocator ());
1814
- Info->Alignment = ReadToken (F , Record, Idx);
1814
+ Info->Alignment = ReadToken (M , Record, Idx);
1815
1815
Tok.setAnnotationValue (static_cast <void *>(Info));
1816
1816
break ;
1817
1817
}
@@ -1827,7 +1827,7 @@ Token ASTReader::ReadToken(ModuleFile &F, const RecordDataImpl &Record,
1827
1827
}
1828
1828
} else {
1829
1829
Tok.setLength (Record[Idx++]);
1830
- if (IdentifierInfo *II = getLocalIdentifier (F , Record[Idx++]))
1830
+ if (IdentifierInfo *II = getLocalIdentifier (M , Record[Idx++]))
1831
1831
Tok.setIdentifierInfo (II);
1832
1832
}
1833
1833
return Tok;
@@ -1997,10 +1997,10 @@ unsigned HeaderFileInfoTrait::ComputeHash(internal_key_ref ikey) {
1997
1997
}
1998
1998
1999
1999
HeaderFileInfoTrait::internal_key_type
2000
- HeaderFileInfoTrait::GetInternalKey (external_key_type FE ) {
2001
- internal_key_type ikey = {FE .getSize (),
2002
- M.HasTimestamps ? FE .getModificationTime () : 0 ,
2003
- FE .getName (), /* Imported*/ false };
2000
+ HeaderFileInfoTrait::GetInternalKey (external_key_type ekey ) {
2001
+ internal_key_type ikey = {ekey .getSize (),
2002
+ M.HasTimestamps ? ekey .getModificationTime () : 0 ,
2003
+ ekey .getName (), /* Imported*/ false };
2004
2004
return ikey;
2005
2005
}
2006
2006
@@ -8946,10 +8946,10 @@ Module *ASTReader::getModule(unsigned ID) {
8946
8946
return getSubmodule (ID);
8947
8947
}
8948
8948
8949
- ModuleFile *ASTReader::getLocalModuleFile (ModuleFile &F , unsigned ID) {
8949
+ ModuleFile *ASTReader::getLocalModuleFile (ModuleFile &M , unsigned ID) {
8950
8950
if (ID & 1 ) {
8951
8951
// It's a module, look it up by submodule ID.
8952
- auto I = GlobalSubmoduleMap.find (getGlobalSubmoduleID (F , ID >> 1 ));
8952
+ auto I = GlobalSubmoduleMap.find (getGlobalSubmoduleID (M , ID >> 1 ));
8953
8953
return I == GlobalSubmoduleMap.end () ? nullptr : I->second ;
8954
8954
} else {
8955
8955
// It's a prefix (preamble, PCH, ...). Look it up by index.
@@ -8959,19 +8959,19 @@ ModuleFile *ASTReader::getLocalModuleFile(ModuleFile &F, unsigned ID) {
8959
8959
}
8960
8960
}
8961
8961
8962
- unsigned ASTReader::getModuleFileID (ModuleFile *F ) {
8963
- if (!F )
8962
+ unsigned ASTReader::getModuleFileID (ModuleFile *M ) {
8963
+ if (!M )
8964
8964
return 1 ;
8965
8965
8966
8966
// For a file representing a module, use the submodule ID of the top-level
8967
8967
// module as the file ID. For any other kind of file, the number of such
8968
8968
// files loaded beforehand will be the same on reload.
8969
8969
// FIXME: Is this true even if we have an explicit module file and a PCH?
8970
- if (F ->isModule ())
8971
- return ((F ->BaseSubmoduleID + NUM_PREDEF_SUBMODULE_IDS) << 1 ) | 1 ;
8970
+ if (M ->isModule ())
8971
+ return ((M ->BaseSubmoduleID + NUM_PREDEF_SUBMODULE_IDS) << 1 ) | 1 ;
8972
8972
8973
8973
auto PCHModules = getModuleManager ().pch_modules ();
8974
- auto I = llvm::find (PCHModules, F );
8974
+ auto I = llvm::find (PCHModules, M );
8975
8975
assert (I != PCHModules.end () && " emitting reference to unknown file" );
8976
8976
return (I - PCHModules.end ()) << 1 ;
8977
8977
}
0 commit comments