]> granicus.if.org Git - llvm/commit
[COFF] Fix error handling in ResourceSectionRef
authorMartin Storsjo <martin@martin.st>
Thu, 29 Aug 2019 08:59:41 +0000 (08:59 +0000)
committerMartin Storsjo <martin@martin.st>
Thu, 29 Aug 2019 08:59:41 +0000 (08:59 +0000)
commit6fcee0361888f874715dc2f77e88f91f2c700919
tree9897ac783e3de3022900ce7763d39c1e1d75a545
parent14e37b0cf2a20bd7de6e551074c6c2505f12b8ed
[COFF] Fix error handling in ResourceSectionRef

Previously, the expression (Reader.readFoo()) was expanded twice,
triggering asserts as one of the Error types ends up not checked
(and as it was expanded twice, the method would end up called twice
if it failed first).

Differential Revision: https://reviews.llvm.org/D66817

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370309 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Object/COFFObjectFile.cpp