[llvm] [NFC][hwasan] Convert ShadowMapping into class (PR #109616)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 14:03:11 PDT 2024
================
@@ -395,15 +395,40 @@ class HWAddressSanitizer {
///
/// If WithFrameRecord is true, then __hwasan_tls will be used to access the
/// ring buffer for storing stack allocations on targets that support it.
- struct ShadowMapping {
+ class ShadowMapping {
uint8_t Scale;
uint64_t Offset;
bool InGlobal;
bool InTls;
bool WithFrameRecord;
+ public:
void init(Triple &TargetTriple, bool InstrumentWithCalls);
Align getObjectAlignment() const { return Align(1ULL << Scale); }
+ bool isInGlobal() const {
+ return !InGlobal && !InTls && Offset == kDynamicShadowSentinel;
+ }
+ bool isInifunc() const {
----------------
fmayer wrote:
nit: `isInIfunc`?
https://github.com/llvm/llvm-project/pull/109616
More information about the llvm-commits
mailing list