mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 23:50:43 +03:00
-fvisibility=hidden: Hide init symbols, TypeInfos and vtables too if the associated aggregate isn't exported (#3129)
This commit is contained in:
parent
ceee37dda2
commit
c1725809c2
10 changed files with 85 additions and 16 deletions
|
@ -146,7 +146,7 @@ public:
|
|||
auto &initZ = ir->getInitSymbol();
|
||||
auto initGlobal = llvm::cast<LLGlobalVariable>(initZ);
|
||||
initZ = irs->setGlobalVarInitializer(initGlobal, ir->getDefaultInit());
|
||||
setLinkage(decl, initGlobal);
|
||||
setLinkageAndVisibility(decl, initGlobal);
|
||||
|
||||
// emit typeinfo
|
||||
if (!ir->suppressTypeInfo()) {
|
||||
|
@ -198,7 +198,7 @@ public:
|
|||
auto &initZ = ir->getInitSymbol();
|
||||
auto initGlobal = llvm::cast<LLGlobalVariable>(initZ);
|
||||
initZ = irs->setGlobalVarInitializer(initGlobal, ir->getDefaultInit());
|
||||
setLinkage(decl, initGlobal);
|
||||
setLinkageAndVisibility(decl, initGlobal);
|
||||
|
||||
llvm::GlobalVariable *vtbl = ir->getVtblSymbol();
|
||||
defineGlobal(vtbl, ir->getVtblInit(), decl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue