LLVM 17.0.0git
SanitizerBinaryMetadata.h
Go to the documentation of this file.
1//===------- Definition of the SanitizerBinaryMetadata class ----*- 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 declares the SanitizerBinaryMetadata pass.
10//
11//===----------------------------------------------------------------------===//
12#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_SANITIZERBINARYMETADATA_H
13#define LLVM_TRANSFORMS_INSTRUMENTATION_SANITIZERBINARYMETADATA_H
14
15#include "llvm/IR/Function.h"
16#include "llvm/IR/Module.h"
17#include "llvm/IR/PassManager.h"
19
20namespace llvm {
21
23 bool Covered = false;
24 bool Atomics = false;
25 bool UAR = false;
27};
28
29inline constexpr int kSanitizerBinaryMetadataAtomicsBit = 0;
30inline constexpr int kSanitizerBinaryMetadataUARBit = 1;
31
37
39 "sanmd_covered";
41 "sanmd_atomics";
42
43/// Public interface to the SanitizerBinaryMetadata module pass for emitting
44/// metadata for binary analysis sanitizers.
45//
46/// The pass should be inserted after optimizations.
48 : public PassInfoMixin<SanitizerBinaryMetadataPass> {
49public:
53 static bool isRequired() { return true; }
54
55private:
57};
58
59} // namespace llvm
60
61#endif
Module.h This file contains the declarations for the Module class.
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: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
Public interface to the SanitizerBinaryMetadata module pass for emitting metadata for binary analysis...
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
constexpr uint32_t kSanitizerBinaryMetadataUAR
constexpr uint32_t kSanitizerBinaryMetadataAtomics
constexpr int kSanitizerBinaryMetadataAtomicsBit
constexpr int kSanitizerBinaryMetadataUARBit
constexpr char kSanitizerBinaryMetadataCoveredSection[]
constexpr uint32_t kSanitizerBinaryMetadataNone
constexpr char kSanitizerBinaryMetadataAtomicsSection[]
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:371