Skip to content

Commit d2dff43

Browse files
paperchalicearsenm
andauthored
[CodeGen] Skip declaration in ModuleToMachineFunctionPassAdaptor (llvm#84417)
Like ModuleToFunctionPassAdaptor. --------- Co-authored-by: Matt Arsenault <[email protected]>
1 parent 7415524 commit d2dff43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/MachinePassManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ ModuleToMachineFunctionPassAdaptor::run(Module &M, ModuleAnalysisManager &AM) {
7979
for (Function &F : M) {
8080
// Do not codegen any 'available_externally' functions at all, they have
8181
// definitions outside the translation unit.
82-
if (F.hasAvailableExternallyLinkage())
82+
if (F.isDeclaration() || F.hasAvailableExternallyLinkage())
8383
continue;
8484

8585
MachineFunction &MF = MMI.getOrCreateMachineFunction(F);

0 commit comments

Comments
 (0)