File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -544,24 +544,25 @@ static T *addComdat(T *G)
544
544
// Add comdat information to make MSVC link.exe happy
545
545
// it's valid to emit this for ld.exe too,
546
546
// but makes it very slow to link for no benefit
547
- #if defined(_COMPILER_MICROSOFT_)
548
547
if (G->getParent () == shadow_output) {
548
+ #if defined(_COMPILER_MICROSOFT_)
549
549
Comdat *jl_Comdat = G->getParent ()->getOrInsertComdat (G->getName ());
550
550
// ELF only supports Comdat::Any
551
551
jl_Comdat->setSelectionKind (Comdat::NoDuplicates);
552
552
G->setComdat (jl_Comdat);
553
- }
554
553
#endif
554
+ #if defined(_CPU_X86_64_)
555
+ // Add unwind exception personalities to functions to handle async exceptions
556
+ assert (!juliapersonality_func || juliapersonality_func->getParent () == shadow_output);
557
+ if (Function *F = dyn_cast<Function>(G))
558
+ F->setPersonalityFn (juliapersonality_func);
559
+ #endif
560
+ }
555
561
// add __declspec(dllexport) to everything marked for export
556
562
if (G->getLinkage () == GlobalValue::ExternalLinkage)
557
563
G->setDLLStorageClass (GlobalValue::DLLExportStorageClass);
558
564
else
559
565
G->setDLLStorageClass (GlobalValue::DefaultStorageClass);
560
- #if defined(_CPU_X86_64_)
561
- // Add unwind exception personalities to functions to handle async exceptions
562
- if (Function *F = dyn_cast<Function>(G))
563
- F->setPersonalityFn (juliapersonality_func);
564
- #endif
565
566
}
566
567
#endif
567
568
return G;
You can’t perform that action at this time.
0 commit comments