change, other than removal of undefined behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187465
91177308-0d34-0410-b5e6-
96231b3b80d8
/// \brief What kind of records we are reading.
enum ReadingKind {
- Read_Decl, Read_Type, Read_Stmt
+ Read_None, Read_Decl, Read_Type, Read_Stmt
};
/// \brief What kind of records we are reading.
NumVisibleDeclContextsRead(0), TotalVisibleDeclContexts(0),
TotalModulesSizeInBits(0), NumCurrentElementsDeserializing(0),
PassingDeclsToConsumer(false),
- NumCXXBaseSpecifiersLoaded(0)
+ NumCXXBaseSpecifiersLoaded(0), ReadingKind(Read_None)
{
SourceMgr.setExternalSLocEntrySource(this);
}
Stmt *ASTReader::ReadStmt(ModuleFile &F) {
switch (ReadingKind) {
+ case Read_None:
+ llvm_unreachable("should not call this when not reading anything");
case Read_Decl:
case Read_Type:
return ReadStmtFromStream(F);