[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)
commit2d56c265046de717dd117c248c3ba8d2a5ff7a5d
tree81306e43c91b58c327c1daf1cc1ca37d3da4e6a7
parent4f243e8d93d17a5346f147b20c80a95352616e74
[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

llvm-svn: 286313
clang/lib/Sema/SemaCUDA.cpp
clang/test/SemaCUDA/add-inline-in-definition.cu [new file with mode: 0644]