summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2016-11-09 23:52:20 +0000
committerShoaib Meenai <smeenai@fb.com>2016-11-09 23:52:20 +0000
commitab3f96cb21ed0bb5697bb5f92f3630d89e1e97de (patch)
tree3312c629848ae12bb5b7458709bd6b33df0aed06 /clang/lib/Sema/SemaTemplate.cpp
parent0d4778f841c91985ec5e230949d6827bdc868fa7 (diff)
downloadbcm5719-llvm-ab3f96cb21ed0bb5697bb5f92f3630d89e1e97de.tar.gz
bcm5719-llvm-ab3f96cb21ed0bb5697bb5f92f3630d89e1e97de.zip
[Sema] Use MS ABI behavior for dllexport in Itanium
Similar to r284288, make the Itanium ABI follow MS ABI dllexport semantics in the case of an explicit instantiation declaration followed by a dllexport explicit instantiation definition. Differential Revision: https://reviews.llvm.org/D26471 llvm-svn: 286419
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index ce41a5eb74f..e87fc73c698 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -7674,7 +7674,8 @@ Sema::ActOnExplicitInstantiation(Scope *S,
Def->setTemplateSpecializationKind(TSK);
if (!getDLLAttr(Def) && getDLLAttr(Specialization) &&
- Context.getTargetInfo().getCXXABI().isMicrosoft()) {
+ (Context.getTargetInfo().getCXXABI().isMicrosoft() ||
+ Context.getTargetInfo().getTriple().isWindowsItaniumEnvironment())) {
// In the MS ABI, an explicit instantiation definition can add a dll
// attribute to a template with a previous instantiation declaration.
// MinGW doesn't allow this.
OpenPOWER on IntegriCloud