[PATCH] D104275: [compiler-rt][hwasan] Add GetShadowOffset function
Vitaly Buka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 16 01:28:13 PDT 2021
vitalybuka added inline comments.
================
Comment at: compiler-rt/lib/hwasan/hwasan_mapping.h:54
+inline uptr GetShadowOffset() {
+ return SANITIZER_FUCHSIA ? 0 : __hwasan_shadow_memory_dynamic_address;
+}
----------------
mcgrathr wrote:
> vitalybuka wrote:
> > mcgrathr wrote:
> > > I think you'll eventually need to make this an `#if` or `if constexpr` for it to be kosher that the symbol isn't defined at all, which is what we'd ideally like to have on Fuchsia.
> > static inline?
> Plain inline has correct semantics here, and is consistent with the existing functions below.
> static inside namespace scope in a header is a strange thing to do.
that's exactly the point: inline and no exported symbol
you can find many of then in llvm headers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104275/new/
https://reviews.llvm.org/D104275
More information about the cfe-commits
mailing list