]> granicus.if.org Git - clang/commit
Modules: Separate out a checkSignature helper, almost NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 28 Jan 2017 21:34:28 +0000 (21:34 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 28 Jan 2017 21:34:28 +0000 (21:34 +0000)
commitf4f30d8e678dff248fe7de991f6800e03c1558ef
tree37af9c77f800f6c15edf11314bb752c4f0d67f09
parent7110ec78c878a0b45948252c74e403a81452756c
Modules: Separate out a checkSignature helper, almost NFC

The main point is to move the delete-the-new-module logic into the same block
that creates it, so I can simplify the memory management in a follow-up, but I
think it's clearer to use use a checkSignature helper here anyway.

There is a minor functionality change: we now scan ahead to pull the signature
out of the control block *only* if this is a new ModuleFile.  For old ones,
ASTReader::ReadControlBlock will have already read the signature.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293393 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Serialization/ModuleManager.cpp