[ThinLTOBitcodeWriter] Mark pass as required

Or else with -opt-bisect-limit we don't write ThinLTO bitcode.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D133378
This commit is contained in:
Arthur Eubanks 2022-09-06 14:35:14 -07:00
parent 7440e2274f
commit 7f57c97d30
2 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,8 @@ public:
: OS(OS), ThinLinkOS(ThinLinkOS) {}
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
static bool isRequired() { return true; }
};
} // namespace llvm

View File

@ -99,6 +99,10 @@
; RUN: opt %s -opt-bisect-limit=0 -passes=early-cse -S | FileCheck %s -check-prefix=CHECK-OUTPUT
; CHECK-OUTPUT: define void @f1
; Make sure we write ThinLTO bitcode
; RUN: opt %s -opt-bisect-limit=0 -disable-verify -thinlto-bc -o /dev/null 2>&1 | FileCheck --allow-empty %s -check-prefix=CHECK-THINLTO
; CHECK-THINLTO-NOT: NOT running pass
declare i32 @g()
define void @f1() {