diff options
author | Hans Wennborg <hans@hanshq.net> | 2016-02-10 22:18:37 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2016-02-10 22:18:37 +0000 |
commit | 8fab56e0dcf48d545a8aae1eae90b4f3d3f2231b (patch) | |
tree | 806ef9716bc5c8762bb37ce5f499ff1d439cfdc0 /clang/lib/AST | |
parent | 4022d529594dea28ef11ae78c214cf37f139f053 (diff) | |
download | bcm5719-llvm-8fab56e0dcf48d545a8aae1eae90b4f3d3f2231b.tar.gz bcm5719-llvm-8fab56e0dcf48d545a8aae1eae90b4f3d3f2231b.zip |
Revert r260388 "[MS ABI] Never reference dllimport'd vtables"
This caused the compiler to fail with "invalid linkage type
for global declaration" (PR26569).
llvm-svn: 260449
Diffstat (limited to 'clang/lib/AST')
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 5 | ||||
-rw-r--r-- | clang/lib/AST/VTableBuilder.cpp | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 930cf00d9e3..0634319cbd1 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -2599,10 +2599,7 @@ void MicrosoftMangleContextImpl::mangleCXXVFTable( // NOTE: <cvr-qualifiers> here is always 'B' (const). <storage-class> // is always '6' for vftables. MicrosoftCXXNameMangler Mangler(*this, Out); - if (Derived->hasAttr<DLLImportAttr>()) - Mangler.getStream() << "\01??_S"; - else - Mangler.getStream() << "\01??_7"; + Mangler.getStream() << "\01??_7"; Mangler.mangleName(Derived); Mangler.getStream() << "6B"; // '6' for vftable, 'B' for const. for (const CXXRecordDecl *RD : BasePath) diff --git a/clang/lib/AST/VTableBuilder.cpp b/clang/lib/AST/VTableBuilder.cpp index b728b279182..bae018652f9 100644 --- a/clang/lib/AST/VTableBuilder.cpp +++ b/clang/lib/AST/VTableBuilder.cpp @@ -2548,6 +2548,7 @@ public: // Only include the RTTI component if we know that we will provide a // definition of the vftable. HasRTTIComponent = Context.getLangOpts().RTTIData && + !MostDerivedClass->hasAttr<DLLImportAttr>() && MostDerivedClass->getTemplateSpecializationKind() != TSK_ExplicitInstantiationDeclaration; |