[llvm] 9d55e86 - [memprof] Fix warnings on MSVC
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 09:50:51 PST 2024
Author: Kazu Hirata
Date: 2024-11-27T09:50:45-08:00
New Revision: 9d55e862d938c17a5e3f970326139c53b9aaf37e
URL: https://github.com/llvm/llvm-project/commit/9d55e862d938c17a5e3f970326139c53b9aaf37e
DIFF: https://github.com/llvm/llvm-project/commit/9d55e862d938c17a5e3f970326139c53b9aaf37e.diff
LOG: [memprof] Fix warnings on MSVC
MSVC doesn't seem to count a use in static_assert as a use.
Added:
Modified:
llvm/lib/ProfileData/MemProfReader.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ProfileData/MemProfReader.cpp b/llvm/lib/ProfileData/MemProfReader.cpp
index c361e83a0ea288..dc4a4adb9267ba 100644
--- a/llvm/lib/ProfileData/MemProfReader.cpp
+++ b/llvm/lib/ProfileData/MemProfReader.cpp
@@ -63,6 +63,14 @@ template <> struct MappingTraits<memprof::Frame> {
static_assert(std::is_same_v<remove_cvref_t<decltype(Column)>, uint32_t>);
static_assert(
std::is_same_v<remove_cvref_t<decltype(IsInlineFrame)>, bool>);
+
+ // MSVC issues unused variable warnings despite the uses in static_assert
+ // above.
+ (void)Function;
+ (void)SymbolName;
+ (void)LineOffset;
+ (void)Column;
+ (void)IsInlineFrame;
}
};
More information about the llvm-commits
mailing list