Skip to content

Commit 6f1edfc

Browse files
committed
!fixup set comdat on thunk.
1 parent 9253d10 commit 6f1edfc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/IPO/MergeFunctions.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,8 @@ void MergeFunctions::mergeTwoFunctions(Function *F, Function *G) {
889889
F->getAddressSpace(), "", F->getParent());
890890
NewF->copyAttributesFrom(F);
891891
NewF->takeName(F);
892+
NewF->setComdat(F->getComdat());
893+
F->setComdat(nullptr);
892894
NewF->IsNewDbgInfoFormat = F->IsNewDbgInfoFormat;
893895
// Ensure CFI type metadata is propagated to the new function.
894896
copyMetadataIfPresent(F, NewF, "type");

0 commit comments

Comments
 (0)