LLVM 23.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#include <cstdlib>
11
12using namespace llvm;
13
19
25
26namespace {
27class TriggerCrashFunctionLegacyPass : public FunctionPass {
28public:
29 static char ID;
30 TriggerCrashFunctionLegacyPass() : FunctionPass(ID) {}
31 bool runOnFunction(Function &F) override {
32 abort();
33 return false;
34 }
35 StringRef getPassName() const override { return "TriggerCrashFunctionPass"; }
36};
37} // namespace
38
39char TriggerCrashFunctionLegacyPass::ID = 0;
40
42 return new TriggerCrashFunctionLegacyPass();
43}
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
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition CallingConv.h:24
This is an optimization pass for GlobalISel generic memory operations.
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