diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp index e3fe9494acef8..ba125d9fee566 100644 --- a/llvm/lib/CodeGen/MachineOutliner.cpp +++ b/llvm/lib/CodeGen/MachineOutliner.cpp @@ -1375,6 +1375,9 @@ void MachineOutliner::emitOutlinedHashTree(Module &M) { } bool MachineOutliner::runOnModule(Module &M) { + if (skipModule(M)) + return false; + // Check if there's anything in the module. If it's empty, then there's // nothing to outline. if (M.empty())