LLVM 23.0.0git
AddressSanitizerCommon.h
Go to the documentation of this file.
1//===--------- Definition of the AddressSanitizer 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 common infrastructure for AddressSanitizer and
10// HWAddressSanitizer.
11//
12//===----------------------------------------------------------------------===//
13#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_ADDRESSSANITIZERCOMMON_H
14#define LLVM_TRANSFORMS_INSTRUMENTATION_ADDRESSSANITIZERCOMMON_H
15
16#include "llvm/Analysis/CFG.h"
19#include "llvm/IR/Dominators.h"
20#include "llvm/IR/Instruction.h"
22#include "llvm/IR/Module.h"
24
25namespace llvm {
26// Get AddressSanitizer parameters.
27LLVM_ABI void getAddressSanitizerParams(const Triple &TargetTriple,
28 int LongSize, bool IsKasan,
29 uint64_t *ShadowBase, int *MappingScale,
30 bool *OrShadowOffset);
31
32/// Remove memory attributes that are incompatible with the instrumentation
33/// added by AddressSanitizer and HWAddressSanitizer.
34/// \p ReadsArgMem - indicates whether function arguments may be read by
35/// instrumentation and require removing `writeonly` attributes.
37
38} // namespace llvm
39
40#endif
#define LLVM_ABI
Definition Compiler.h:213
Module.h This file contains the declarations for the Module class.
#define F(x, y, z)
Definition MD5.cpp:54
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:47
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void removeASanIncompatibleFnAttributes(Function &F, bool ReadsArgMem)
Remove memory attributes that are incompatible with the instrumentation added by AddressSanitizer and...
LLVM_ABI void getAddressSanitizerParams(const Triple &TargetTriple, int LongSize, bool IsKasan, uint64_t *ShadowBase, int *MappingScale, bool *OrShadowOffset)