]> granicus.if.org Git - clang/commit
[Modules] Early-exit if ReadOptionsBlock fails to avoid crashing
authorBen Langmuir <blangmuir@apple.com>
Thu, 11 Feb 2016 18:54:02 +0000 (18:54 +0000)
committerBen Langmuir <blangmuir@apple.com>
Thu, 11 Feb 2016 18:54:02 +0000 (18:54 +0000)
commit0a88921083656be573ac2532877961e358c2137d
tree9e1169d272e7fb4b76486a7c246ec23d724e3268
parentd0f454243825eebae31c1aac1351784d13af9d79
[Modules] Early-exit if ReadOptionsBlock fails to avoid crashing

If we didn't tell ReadOptionsBlock to allow failures then we can't
assume that the stream is not in the middle of a block if it returns
out-of-date. This was causing a crash when we tried to continue reading.

Also, it's just generally a good idea to early-exit if we're doing
implicit module builds, since we will want to immediately rebuild this
module anyway and there's no reason to waste time continuing after
failure.

rdar://problem/24114938

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260563 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Serialization/ASTReader.cpp
test/Modules/implicit-build-config-out-of-date.m [new file with mode: 0644]