File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1594,9 +1594,6 @@ llvm::Function *irgen::createFunction(IRGenModule &IGM,
1594
1594
1595
1595
llvm::Function *fn =
1596
1596
llvm::Function::Create (signature.getType (), linkInfo.getLinkage (), name);
1597
- // TODO(compnerd) apply COMDAT to definitions
1598
- fn->setVisibility (linkInfo.getVisibility ());
1599
- fn->setDLLStorageClass (linkInfo.getDLLStorage ());
1600
1597
fn->setCallingConv (signature.getCallingConv ());
1601
1598
1602
1599
if (insertBefore) {
@@ -1605,6 +1602,9 @@ llvm::Function *irgen::createFunction(IRGenModule &IGM,
1605
1602
IGM.Module .getFunctionList ().push_back (fn);
1606
1603
}
1607
1604
1605
+ ApplyIRLinkage ({linkInfo.getLinkage (), linkInfo.getVisibility (), linkInfo.getDLLStorage ()})
1606
+ .to (fn);
1607
+
1608
1608
llvm::AttrBuilder initialAttrs;
1609
1609
IGM.constructInitialFnAttributes (initialAttrs, FuncOptMode);
1610
1610
// Merge initialAttrs with attrs.
You can’t perform that action at this time.
0 commit comments