LLVM 17.0.0git
MemorySanitizer.h
Go to the documentation of this file.
1//===- Transforms/Instrumentation/MemorySanitizer.h - MSan Pass -----------===//
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 the memoy sanitizer pass.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_MEMORYSANITIZER_H
14#define LLVM_TRANSFORMS_INSTRUMENTATION_MEMORYSANITIZER_H
15
17#include "llvm/IR/PassManager.h"
18
19namespace llvm {
20class Module;
21class StringRef;
22class raw_ostream;
23
29 bool EagerChecks);
30 bool Kernel;
32 bool Recover;
34};
35
36/// A module pass for msan instrumentation.
37///
38/// Instruments functions to detect unitialized reads. This function pass
39/// inserts calls to runtime library functions. If the functions aren't declared
40/// yet, the pass inserts the declarations. Otherwise the existing globals are
41/// used.
42struct MemorySanitizerPass : public PassInfoMixin<MemorySanitizerPass> {
44
47 function_ref<StringRef(StringRef)> MapClassName2PassName);
48 static bool isRequired() { return true; }
49
50private:
52};
53}
54
55#endif /* LLVM_TRANSFORMS_INSTRUMENTATION_MEMORYSANITIZER_H */
Machine Check Debug Module
const char LLVMTargetMachineRef LLVMPassBuilderOptionsRef Options
This header defines various interfaces for pass management in LLVM.
raw_pwrite_stream & OS
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:620
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:152
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
An efficient, type-erasing, non-owning reference to a callable.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
MemorySanitizerOptions(int TrackOrigins, bool Recover, bool Kernel)
A module pass for msan instrumentation.
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
MemorySanitizerPass(MemorySanitizerOptions Options)
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:371