LLVM 22.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"
23
24namespace llvm {
25// Get AddressSanitizer parameters.
26void getAddressSanitizerParams(const Triple &TargetTriple, int LongSize,
27 bool IsKasan, uint64_t *ShadowBase,
28 int *MappingScale, bool *OrShadowOffset);
29
30/// Remove memory attributes that are incompatible with the instrumentation
31/// added by AddressSanitizer and HWAddressSanitizer.
32/// \p ReadsArgMem - indicates whether function arguments may be read by
33/// instrumentation and require removing `writeonly` attributes.
34void removeASanIncompatibleFnAttributes(Function &F, bool ReadsArgMem);
35
36} // namespace llvm
37
38#endif
Module.h This file contains the declarations for the Module class.
#define F(x, y, z)
Definition MD5.cpp:55
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:47
This is an optimization pass for GlobalISel generic memory operations.
void removeASanIncompatibleFnAttributes(Function &F, bool ReadsArgMem)
Remove memory attributes that are incompatible with the instrumentation added by AddressSanitizer and...
void getAddressSanitizerParams(const Triple &TargetTriple, int LongSize, bool IsKasan, uint64_t *ShadowBase, int *MappingScale, bool *OrShadowOffset)