]> granicus.if.org Git - clang/commit
Check for frontend errors after releasing the Builder.
authorManman Ren <manman.ren@gmail.com>
Thu, 28 Jan 2016 23:29:02 +0000 (23:29 +0000)
committerManman Ren <manman.ren@gmail.com>
Thu, 28 Jan 2016 23:29:02 +0000 (23:29 +0000)
commit2309ae8a8252f29ee943cc6d8d5f0a39eb4bcf3c
tree932395bf47b9779a9a2fb91ef5bd47da8e319027
parent29ba6ff781a897a7eca8c5f4bd627ab0f372791f
Check for frontend errors after releasing the Builder.

Frontend can emit errors when releaseing the Builder. If there are errors before
or when releasing the Builder, we reset the module to stop here before invoking
the backend.

Before this commit, clang will continue to invoke the backend and backend can
crash.

Differential Revision: http://reviews.llvm.org/D16564

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259116 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ModuleBuilder.cpp
test/CodeGen/target-builtin-error-3.c [new file with mode: 0644]