forked from OSchip/llvm-project
Use AddString/ReadString instead of doing it manually NFC
llvm-svn: 240434
This commit is contained in:
parent
cd98cb7312
commit
d4a667a4c0
|
@ -4449,12 +4449,8 @@ bool ASTReader::ParseLanguageOptions(const RecordData &Record,
|
|||
ObjCRuntime::Kind runtimeKind = (ObjCRuntime::Kind) Record[Idx++];
|
||||
VersionTuple runtimeVersion = ReadVersionTuple(Record, Idx);
|
||||
LangOpts.ObjCRuntime = ObjCRuntime(runtimeKind, runtimeVersion);
|
||||
|
||||
unsigned Length = Record[Idx++];
|
||||
LangOpts.CurrentModule.assign(Record.begin() + Idx,
|
||||
Record.begin() + Idx + Length);
|
||||
|
||||
Idx += Length;
|
||||
LangOpts.CurrentModule = ReadString(Record, Idx);
|
||||
|
||||
// Comment options.
|
||||
for (unsigned N = Record[Idx++]; N; --N) {
|
||||
|
|
|
@ -1272,9 +1272,8 @@ void ASTWriter::WriteControlBlock(Preprocessor &PP, ASTContext &Context,
|
|||
|
||||
Record.push_back((unsigned) LangOpts.ObjCRuntime.getKind());
|
||||
AddVersionTuple(LangOpts.ObjCRuntime.getVersion(), Record);
|
||||
|
||||
Record.push_back(LangOpts.CurrentModule.size());
|
||||
Record.append(LangOpts.CurrentModule.begin(), LangOpts.CurrentModule.end());
|
||||
|
||||
AddString(LangOpts.CurrentModule, Record);
|
||||
|
||||
// Comment options.
|
||||
Record.push_back(LangOpts.CommentOpts.BlockCommandNames.size());
|
||||
|
|
Loading…
Reference in New Issue