summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGVTables.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp
index 64b6d0d3fe9..7c9f07d32d8 100644
--- a/clang/lib/CodeGen/CGVTables.cpp
+++ b/clang/lib/CodeGen/CGVTables.cpp
@@ -64,6 +64,10 @@ static void setThunkProperties(CodeGenModule &CGM, const ThunkInfo &Thunk,
const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
setThunkVisibility(CGM, MD, Thunk, ThunkFn);
+ // Propagate dllexport storage.
+ if (MD->hasAttr<DLLExportAttr>())
+ ThunkFn->setDLLStorageClass(llvm::GlobalValue::DLLExportStorageClass);
+
if (CGM.supportsCOMDAT() && ThunkFn->isWeakForLinker())
ThunkFn->setComdat(CGM.getModule().getOrInsertComdat(ThunkFn->getName()));
}
OpenPOWER on IntegriCloud