LLVM 24.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.
28 const Triple &TargetTriple,
29 int LongSize, bool IsKasan,
30 uint64_t *ShadowBase, int *MappingScale,
31 bool *OrShadowOffset);
32
33/// Remove memory attributes that are incompatible with the instrumentation
34/// added by AddressSanitizer and HWAddressSanitizer.
35/// \p ReadsArgMem - indicates whether function arguments may be read by
36/// instrumentation and require removing `writeonly` attributes.
38
39} // namespace llvm
40
41#endif
uint64_t uint64_t
#define LLVM_ABI
Definition Compiler.h:211
Module.h This file contains the declarations for the Module class.
#define F(x, y, z)
Definition MD5.cpp:54
This is an important class for using LLVM in a threaded context.
Definition LLVMContext.h:76
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:48
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void getAddressSanitizerParams(const LLVMContext &Ctx, const Triple &TargetTriple, int LongSize, bool IsKasan, uint64_t *ShadowBase, int *MappingScale, bool *OrShadowOffset)
LLVM_ABI void removeASanIncompatibleFnAttributes(Function &F, bool ReadsArgMem)
Remove memory attributes that are incompatible with the instrumentation added by AddressSanitizer and...