aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/__algorithm/sample.h
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2022-02-04 11:11:11 +0100
committerHans Wennborg <hans@chromium.org>2022-02-04 16:31:51 +0100
commit853e0aa424e40b80d0bda1dd8a3471a361048e4b (patch)
tree4a90d1ae4e2abafa025418388339fa1dc2c9ea99 /libcxx/include/__algorithm/sample.h
parent466c0d0dc7c84139cf747b5513f69b8c6a772e7f (diff)
downloadllvm-853e0aa424e40b80d0bda1dd8a3471a361048e4b.zip
llvm-853e0aa424e40b80d0bda1dd8a3471a361048e4b.tar.gz
llvm-853e0aa424e40b80d0bda1dd8a3471a361048e4b.tar.bz2
Don't dllexport reference temporaries
Even if the reference itself is dllexport, the temporary should not be. In fact, we're already giving it internal linkage, so dllexporting it is not just wasteful, but will fail to link, as in the example below: $ cat /tmp/a.cc void _DllMainCRTStartup() {} const int __declspec(dllexport) &foo = 42; $ clang-cl -fuse-ld=lld /tmp/a.cc /Zl /link /dll /out:a.dll lld-link: error: <root>: undefined symbol: int const &foo::$RT1 Differential revision: https://reviews.llvm.org/D118980
Diffstat (limited to 'libcxx/include/__algorithm/sample.h')
0 files changed, 0 insertions, 0 deletions