summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-06-06 17:36:17 +0000
committerHans Wennborg <hans@hanshq.net>2014-06-06 17:36:17 +0000
commit8cf6d63a853e8f59df80b97c941b2162752d0c68 (patch)
tree96e45075c1268d5bb7e8750bc95d81ff890b5ff5 /lib/CodeGen/CGExpr.cpp
parent150a4989ecf988595f80809abf84835c9625b33c (diff)
downloadclang-8cf6d63a853e8f59df80b97c941b2162752d0c68.tar.gz
clang-8cf6d63a853e8f59df80b97c941b2162752d0c68.tar.bz2
clang-8cf6d63a853e8f59df80b97c941b2162752d0c68.tar.xz
Defer codegen of inline method definitions to the end of current top level declaration
We would previously fail to emit a definition of bar() for the following code: struct __declspec(dllexport) S { void foo() { t->bar(); } struct T { void bar() {} }; T *t; }; Note that foo() is an exported method, but bar() is not. However, foo() refers to bar() so we need to emit its definition. We would previously fail to realise that bar() is used. By deferring the method definitions until the end of the top level declaration, we can simply call EmitTopLevelDecl on them and rely on the usual mechanisms to decide whether the method should be emitted or not. Differential Revision: http://reviews.llvm.org/D4038 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
0 files changed, 0 insertions, 0 deletions