[dllimport] Honor always_inline when deciding whether a dllimport function should...
authorHans Wennborg <hans@chromium.org>
Fri, 29 Jan 2021 09:54:40 +0000 (10:54 +0100)
committerHans Wennborg <hans@chromium.org>
Tue, 2 Feb 2021 09:28:32 +0000 (10:28 +0100)
commit0479c53b6c5224c16bdc78cb014e76c0b0dbc6f9
tree920183e8da0f0334d9afe79b1fc430bc22ca699d
parentb91afa474e124514fe7bd3f399af0cbbcbe961fc
[dllimport] Honor always_inline when deciding whether a dllimport function should be available for inlining (PR48925)

Normally, Clang will not make dllimport functions available for inlining
if they reference non-imported symbols, as this can lead to confusing
link errors. But if the function is marked always_inline, the user
presumably knows what they're doing and the attribute should be honored.

Differential revision: https://reviews.llvm.org/D95673
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/CodeGenCXX/dllimport.cpp