summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/dllimport-members.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [MS] Don't escape MS C++ names with \01Reid Kleckner2018-03-161-204/+204
| | | | | | | It is not needed after LLVM r327734. Now it will be easier to copy-paste IR symbol names from Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327738 91177308-0d34-0410-b5e6-96231b3b80d8
* Bring r325915 back.Rafael Espindola2018-02-231-199/+199
| | | | | | | | | | | | | | | The tests that failed on a windows host have been fixed. Original message: Start setting dso_local for COFF. With this there are still some GVs where we don't set dso_local because setGVProperties is never called. I intend to fix that in followup commits. This is just the bare minimum to teach shouldAssumeDSOLocal what it should do for COFF. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325940 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Start setting dso_local for COFF."Rafael Espindola2018-02-231-199/+199
| | | | | | | | This reverts commit r325915. It will take some time to fix the failures on a windows host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325929 91177308-0d34-0410-b5e6-96231b3b80d8
* Start setting dso_local for COFF.Rafael Espindola2018-02-231-199/+199
| | | | | | | | | With this there are still some GVs where we don't set dso_local because setGVProperties is never called. I intend to fix that in followup commits. This is just the bare minimum to teach shouldAssumeDSOLocal what it should do for COFF. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325915 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Fix for PR32990"Reid Kleckner2017-12-211-4/+8
| | | | | | | | | | | | This reverts commit r321239. It broke the Chromium DLL build: [8834/50217] LINK(DLL) icui18n.dll icui18n.dll.lib icui18n.dll.pdb FAILED: icui18n.dll icui18n.dll.lib icui18n.dll.pdb zrule.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl icu_60::UnicodeString::`vbase destructor'(void)" (__imp_??_DUnicodeString@icu_60@@QEAAXXZ) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321298 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR32990Erich Keane2017-12-211-8/+4
| | | | | | | | | | This fixes the bug in https://bugs.llvm.org/show_bug.cgi?id=32990. Patch By: zahiraam Differential Revision: https://reviews.llvm.org/D39063 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321239 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't suppress instantiation of definitions for variables subject to explicitRichard Smith2017-10-181-2/+2
| | | | | | | | | | instantiation declarations if they are usable from constant expressions. We are permitted to instantiate in these cases, and required to do so in order to have an initializer available for use within constant evaluation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316136 91177308-0d34-0410-b5e6-96231b3b80d8
* Try harder to not inline dllimport functions referencing non-dllimport functionsHans Wennborg2016-09-131-1/+1
| | | | | | | | In r246338, code was added to check for this, but it failed to take into account implicit destructor invocations because those are not reflected in the AST. This adds a separate check for them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281395 91177308-0d34-0410-b5e6-96231b3b80d8
* [ms][dll] #26935 Defining a dllimport function should cause it to be exportedDenis Zobnin2016-05-251-14/+14
| | | | | | | | | | | | | | | | | | | | If we have some function with dllimport attribute and then we have the function definition in the same module but without dllimport attribute we should add dllexport attribute to this function definition. The same should be done for variables. Example: struct __declspec(dllimport) C3 { ~C3(); }; C3::~C3() {;} // we should export this definition. Patch by Andrew V. Tischenko Differential revision: http://reviews.llvm.org/D18953 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270686 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't dllimport inline functions when targeting MinGW (PR21366)Hans Wennborg2014-11-031-203/+205
| | | | | | | | | | | | It turns out that MinGW never dllimports of exports inline functions. This means that code compiled with Clang would fail to link with MinGW-compiled libraries since we might try to import functions that are not imported. To fix this, make Clang never dllimport inline functions when targeting MinGW. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221154 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark C++ reference parameters as dereferenceableHal Finkel2014-07-181-78/+78
| | | | | | | | | | | | | | Because references must be initialized using some evaluated expression, they must point to something, and a callee can assume the reference parameter is dereferenceable. Taking advantage of a new attribute just added to LLVM, mark them as such. Because dereferenceability in addrspace(0) implies nonnull in the backend, we don't need both attributes. However, we need to know the size of the object to use the dereferenceable attribute, so for incomplete types we still emit only nonnull. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213386 91177308-0d34-0410-b5e6-96231b3b80d8
* MS compatibility: always emit dllexported in-class initialized static data ↵Hans Wennborg2014-07-171-6/+6
| | | | | | | | | | | | | | members (PR20140) This makes us emit dllexported in-class initialized static data members (which are treated as definitions in MSVC), even when they're not referenced. It also makes their special linkage reflected in the GVA linkage instead of getting massaged in CodeGen. Differential Revision: http://reviews.llvm.org/D4563 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213304 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some minor typos in testsNico Rieck2014-05-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209830 91177308-0d34-0410-b5e6-96231b3b80d8
* MS ABI: Emit static data members with proper linkageNico Rieck2014-05-291-14/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209826 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'nonnull' parameter or return attribute when producing an llvm pointer ↵Nick Lewycky2014-05-281-78/+78
| | | | | | type in a function type where the C++ type is a reference. Update the tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209723 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't dllimport/export destructor variants implemented by thunks.Hans Wennborg2014-05-281-13/+10
| | | | | | | | | | | | MSVC doesn't export these functions, so trying to import them doesnt' work. Also, don't let any dll attributes on the CXXDestructorDecl influence the thunk's linkage -- they should always be linkonce_odr. This takes care of the FIXME's for this in Nico's tests. Differential Revision: http://reviews.llvm.org/D3930 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209706 91177308-0d34-0410-b5e6-96231b3b80d8
* IRGen: Add more tests for dll attributesNico Rieck2014-05-251-0/+886
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209596 91177308-0d34-0410-b5e6-96231b3b80d8