LLVM 24.0.0git
TriggerCrashPass.cpp
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM Exceptions
6//
7//===----------------------------------------------------------------------===//
8
10
11using namespace llvm;
12
18
24
25namespace {
26class TriggerCrashFunctionLegacyPass : public FunctionPass {
27public:
28 static char ID;
29 TriggerCrashFunctionLegacyPass() : FunctionPass(ID) {}
30 bool runOnFunction(Function &F) override {
31 abort();
32 return false;
33 }
34 StringRef getPassName() const override { return "TriggerCrashFunctionPass"; }
35};
36} // namespace
37
38char TriggerCrashFunctionLegacyPass::ID = 0;
39
41 return new TriggerCrashFunctionLegacyPass();
42}
static bool runOnFunction(Function &F, bool PostInlining)
#define F(x, y, z)
Definition MD5.cpp:54
FunctionPass class - This class is used to implement most global optimizations.
Definition Pass.h:314
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:67
A set of analyses that are preserved following a run of a transformation pass.
Definition Analysis.h:112
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
Definition Analysis.h:118
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI FunctionPass * createTriggerCrashFunctionPass()
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
Definition MIRParser.h:39