]> granicus.if.org Git - clang/commit
[CUDA] Use only the GVALinkage on function definitions.
authorJustin Lebar <jlebar@google.com>
Tue, 8 Nov 2016 23:45:51 +0000 (23:45 +0000)
committerJustin Lebar <jlebar@google.com>
Tue, 8 Nov 2016 23:45:51 +0000 (23:45 +0000)
commit8a8f86873029d28fd7ab8c1edecbc93da6a638a1
tree00a3a1f117876ce1a4cf5386081e752437584a5b
parent5132a3d4434ab01df2b75ee83f4f7415eea09dcd
[CUDA] Use only the GVALinkage on function definitions.

Summary:
Previously we'd look at the GVALinkage of whatever FunctionDecl you
happened to be calling.

This is not right.  In the absence of the gnu_inline attribute, to be
handled separately, the function definition determines the function's
linkage.  So we need to wait until we get a def before we can know
whether something is known-emitted.

Reviewers: tra

Subscribers: cfe-commits, rsmith

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286313 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaCUDA.cpp
test/SemaCUDA/add-inline-in-definition.cu [new file with mode: 0644]