clang 19.0.0git
SanitizerMetadata.h
Go to the documentation of this file.
1//===--- SanitizerMetadata.h - Metadata for sanitizers ----------*- 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// Class which emits metadata consumed by sanitizer instrumentation passes.
10//
11//===----------------------------------------------------------------------===//
12#ifndef LLVM_CLANG_LIB_CODEGEN_SANITIZERMETADATA_H
13#define LLVM_CLANG_LIB_CODEGEN_SANITIZERMETADATA_H
14
15#include "clang/AST/Type.h"
16#include "clang/Basic/LLVM.h"
19
20namespace llvm {
21class GlobalVariable;
22class Instruction;
23} // namespace llvm
24
25namespace clang {
26class VarDecl;
27
28namespace CodeGen {
29
30class CodeGenModule;
31
33 SanitizerMetadata(const SanitizerMetadata &) = delete;
34 void operator=(const SanitizerMetadata &) = delete;
35
36 CodeGenModule &CGM;
37
38public:
40 void reportGlobal(llvm::GlobalVariable *GV, const VarDecl &D,
41 bool IsDynInit = false);
42 void reportGlobal(llvm::GlobalVariable *GV, SourceLocation Loc,
43 StringRef Name, QualType Ty = {},
44 SanitizerMask NoSanitizeAttrMask = {},
45 bool IsDynInit = false);
46 void disableSanitizerForGlobal(llvm::GlobalVariable *GV);
47};
48} // end namespace CodeGen
49} // end namespace clang
50
51#endif
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines the clang::SanitizerKind enum.
Defines the clang::SourceLocation class and associated facilities.
C Language Family Type Representation.
This class organizes the cross-function state that is used while generating LLVM code.
void disableSanitizerForGlobal(llvm::GlobalVariable *GV)
void reportGlobal(llvm::GlobalVariable *GV, const VarDecl &D, bool IsDynInit=false)
A (possibly-)qualified type.
Definition: Type.h:737
Encodes a location in the source.
Represents a variable declaration or definition.
Definition: Decl.h:918
The JSON file list parser is used to communicate input to InstallAPI.
YAML serialization mapping.
Definition: Dominators.h:30