LLVM 20.0.0git
Lint.h
Go to the documentation of this file.
1//===-- llvm/Analysis/Lint.h - LLVM IR Lint ---------------------*- C++ -*-===//
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-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines lint interfaces that can be used for some validation of
10// input to the system, and for checking that transformations haven't done
11// something bad. In contrast to the Verifier, the Lint checker checks for
12// undefined behavior or constructions with likely unintended behavior.
13//
14// To see what specifically is checked, look at Lint.cpp
15//
16//===----------------------------------------------------------------------===//
17
18#ifndef LLVM_ANALYSIS_LINT_H
19#define LLVM_ANALYSIS_LINT_H
20
21#include "llvm/IR/PassManager.h"
22
23namespace llvm {
24
25class Module;
26class Function;
27
28/// Lint a module.
29///
30/// This should only be used for debugging, because it plays games with
31/// PassManagers and stuff.
32void lintModule(const Module &M);
33
34// Lint a function.
35void lintFunction(const Function &F);
36
37class LintPass : public PassInfoMixin<LintPass> {
38public:
40};
41
42} // namespace llvm
43
44#endif // LLVM_ANALYSIS_LINT_H
#define F(x, y, z)
Definition: MD5.cpp:55
Machine Check Debug Module
This header defines various interfaces for pass management in LLVM.
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:253
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Definition: Lint.cpp:694
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:111
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
void lintModule(const Module &M)
Lint a module.
Definition: Lint.cpp:737
void lintFunction(const Function &F)
lintFunction - Check a function for errors, printing messages on stderr.
Definition: Lint.cpp:717
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:69