]> granicus.if.org Git - clang/commit
[CodeGen] Handle recursion in LLVMIRGeneration Timer.
authorDavide Italiano <davide@freebsd.org>
Thu, 21 Jul 2016 06:28:48 +0000 (06:28 +0000)
committerDavide Italiano <davide@freebsd.org>
Thu, 21 Jul 2016 06:28:48 +0000 (06:28 +0000)
commit68dff7bcedd34e0835f27c1061260a44a601a0a3
tree15ac1f71fc62cbbfcb9fa5891cb0a63a43793b46
parent1858d9590df101cd114c82c4b1e78ef0e94b88d1
[CodeGen] Handle recursion in LLVMIRGeneration Timer.

This can happen when emitting a local decl, which triggers
loading a decl imported from an AST file, which we then
hand to the AST consumer. Timer is not allowed to recurse
so an assertion fire. Keep a reference counter to avoid this
problem. LGTM'd by Richard Smith on IRC.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276242 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenAction.cpp