diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-03-01 00:35:47 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-03-01 00:35:47 +0000 |
commit | b735004615be10ffa60dd3d4b0a060f0bed2f8de (patch) | |
tree | d6852673e5d3a3fd1725c62a640e6b5d63f5d458 /clang/lib/CodeGen/CGVTables.cpp | |
parent | 2b94972eb981090e0289ba56edd22b311e9fd6f7 (diff) | |
download | bcm5719-llvm-b735004615be10ffa60dd3d4b0a060f0bed2f8de.tar.gz bcm5719-llvm-b735004615be10ffa60dd3d4b0a060f0bed2f8de.zip |
Start setting dllimport/dllexport in setGVProperties.
This is the next step in setting dso_local for COFF.
The patches changes setGVProperties to first set dllimport/dllexport
and changes a few cases that were setting dllimport/dllexport
manually. With this a few more GVs are marked dso_local.
llvm-svn: 326397
Diffstat (limited to 'clang/lib/CodeGen/CGVTables.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGVTables.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp index 275594237a5..4fb749fbde5 100644 --- a/clang/lib/CodeGen/CGVTables.cpp +++ b/clang/lib/CodeGen/CGVTables.cpp @@ -57,7 +57,12 @@ static void setThunkProperties(CodeGenModule &CGM, const ThunkInfo &Thunk, !Thunk.Return.isEmpty()); // Set the right visibility. - CGM.setGVProperties(ThunkFn, cast<CXXMethodDecl>(GD.getDecl())); + CGM.setGVProperties(ThunkFn, GD); + + if (!CGM.getCXXABI().exportThunk()) { + ThunkFn->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass); + ThunkFn->setDSOLocal(true); + } if (CGM.supportsCOMDAT() && ThunkFn->isWeakForLinker()) ThunkFn->setComdat(CGM.getModule().getOrInsertComdat(ThunkFn->getName())); |