summaryrefslogtreecommitdiff
path: root/lib/Frontend/CreateInvocationFromCommandLine.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-06-25 18:25:57 +0000
committerHans Wennborg <hans@hanshq.net>2014-06-25 18:25:57 +0000
commite5fdb78baffc29df6c772dbe80c113bc22bd72c6 (patch)
tree58027e501f90d4c522627694a29d701b6e5e0b64 /lib/Frontend/CreateInvocationFromCommandLine.cpp
parentccaf37e1c9c5e4bf74224ef779d62b3ba05e3615 (diff)
downloadclang-e5fdb78baffc29df6c772dbe80c113bc22bd72c6.tar.gz
clang-e5fdb78baffc29df6c772dbe80c113bc22bd72c6.tar.bz2
clang-e5fdb78baffc29df6c772dbe80c113bc22bd72c6.tar.xz
MS ABI: Propagate class-level DLL attributes to class template specialization bases (PR11170)
Consider the following code: template <typename T> class Base {}; class __declspec(dllexport) class Derived : public Base<int> {} When the base of an exported or imported class is a class template specialization, MSVC will propagate the dll attribute to the base. In the example code, Base<int> becomes a dllexported class. This commit makes Clang do the proopagation when the base hasn't been instantiated yet, and warns about it being unsupported otherwise. This is different from MSVC, which allows changing a specialization back and forth between dllimport and dllexport and seems to let the last one win. Changing the dll attribute after instantiation would be hard for us, and doesn't seem to come up in practice, so I think this is a reasonable limitation to have. MinGW doesn't do this kind of propagation. Differential Revision: http://reviews.llvm.org/D4264 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211725 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions