]> granicus.if.org Git - clang/commit
Modules: Fix a minor performance bug from r293393
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 29 Jan 2017 04:42:21 +0000 (04:42 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 29 Jan 2017 04:42:21 +0000 (04:42 +0000)
commit54791eac1f3e69f924401c3883817684cfa5d563
tree8d569535a178746cc35c3eaf3a617b5080c5ff34
parent0da88cf858ae543ca6d79451013c80cc2b4b3de6
Modules: Fix a minor performance bug from r293393

Oops... r293393 started calling ReadSignature in
ModuleManager::addModule even when there was no ExpectedSignature.

Whether or not this would have a measurable performance impact (I
spotted this by inspection, and ReadSignature should be fairly fast), we
might as well get what we can.  Add an extra check against
ExpectedSignature to avoid the hit.

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