[modules] Write out identifiers if the ID is local, too.
In some cases a slot for an identifier is requested but it gets written to another module, causing an assertion. At the point when we start serializing Rtypes, we have no imported IdentifierID for float_round_style. We start serializing stuff and allocate an ID for it. Then, during the serialization process, we pull in the identifier info for it from TSchemaHelper. Finally, WriteIdentifierTable decides that the identifier has not changed since it was deserialized, so doesn't emit it. Fixes https://llvm.org/bugs/show_bug.cgi?id=27041 Discussed on IRC with Richard Smith. Agreed on post commit review if needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264913 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- lib/Serialization/ASTWriter.cpp 4 additions, 1 deletionlib/Serialization/ASTWriter.cpp
- test/Modules/Inputs/PR27041/Rtypes.h 1 addition, 0 deletionstest/Modules/Inputs/PR27041/Rtypes.h
- test/Modules/Inputs/PR27041/TGenericClassInfo.h 3 additions, 0 deletionstest/Modules/Inputs/PR27041/TGenericClassInfo.h
- test/Modules/Inputs/PR27041/TSchemaHelper.h 1 addition, 0 deletionstest/Modules/Inputs/PR27041/TSchemaHelper.h
- test/Modules/Inputs/PR27041/module.modulemap 2 additions, 0 deletionstest/Modules/Inputs/PR27041/module.modulemap
- test/Modules/pr27041.cpp 7 additions, 0 deletionstest/Modules/pr27041.cpp
Loading
Please register or sign in to comment