Repository navigation
[scudo] Remove internal linkage from LargeBlock header helpers (NFC) - #207708
Conversation
addHeaderTag and getHeader are static function templates in secondary.h, so any TU that includes the header without using them trips -Wunused-template. The scudo unit tests hit this. Dropping static fixes the warning. Part of llvm#202945.
|
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Aditya Medhane (flash1729) Changes
Part of #202945. 1 Files Affected:
diff --git a/compiler-rt/lib/scudo/standalone/secondary.h b/compiler-rt/lib/scudo/standalone/secondary.h
index 26c45cc4b7626..b4a5685080b03 100644
--- a/compiler-rt/lib/scudo/standalone/secondary.h
+++ b/compiler-rt/lib/scudo/standalone/secondary.h
@@ -56,17 +56,17 @@ static_assert(!archSupportsMemoryTagging() ||
constexpr uptr getHeaderSize() { return sizeof(Header); }
-template <typename Config> static uptr addHeaderTag(uptr Ptr) {
+template <typename Config> uptr addHeaderTag(uptr Ptr) {
if (allocatorSupportsMemoryTagging<Config>())
return addFixedTag(Ptr, 1);
return Ptr;
}
-template <typename Config> static Header *getHeader(uptr Ptr) {
+template <typename Config> Header *getHeader(uptr Ptr) {
return reinterpret_cast<Header *>(addHeaderTag<Config>(Ptr)) - 1;
}
-template <typename Config> static Header *getHeader(const void *Ptr) {
+template <typename Config> Header *getHeader(const void *Ptr) {
return getHeader<Config>(reinterpret_cast<uptr>(Ptr));
}
|
|
Ping for review @cferris1000 @vgvassilev |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/226/builds/11844 Here is the relevant piece of the build log for the reference |
1 similar comment
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/226/builds/11844 Here is the relevant piece of the build log for the reference |
addHeaderTagandgetHeaderare static function templates insecondary.h,so any TU that includes the header without using them trips-Wunused-template. Dropping static fixes the warning.Part of #202945.