Commit 3a38e93e authored by Jonas Hahnfeld's avatar Jonas Hahnfeld Committed by Tobias Hieta
Browse files

[CodeGen] Clean up access to EmittedDeferredDecls, NFCI.

GlobalDecls should only be added to EmittedDeferredDecls if they
need reemission. This is checked in addEmittedDeferredDecl, which
is called via addDeferredDeclToEmit. Extend these checks to also
handle VarDecls (for lambdas, as tested in Interpreter/lambda.cpp)
and remove the direct access of EmittedDeferredDecls in EmitGlobal
that may actually end up duplicating FunctionDecls.

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

(cherry picked from commit b719e410)
parent c202e5c2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment