Skip to content

Commit 9d55e86

Browse files
[memprof] Fix warnings on MSVC
MSVC doesn't seem to count a use in static_assert as a use.
1 parent a475180 commit 9d55e86

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/lib/ProfileData/MemProfReader.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ template <> struct MappingTraits<memprof::Frame> {
6363
static_assert(std::is_same_v<remove_cvref_t<decltype(Column)>, uint32_t>);
6464
static_assert(
6565
std::is_same_v<remove_cvref_t<decltype(IsInlineFrame)>, bool>);
66+
67+
// MSVC issues unused variable warnings despite the uses in static_assert
68+
// above.
69+
(void)Function;
70+
(void)SymbolName;
71+
(void)LineOffset;
72+
(void)Column;
73+
(void)IsInlineFrame;
6674
}
6775
};
6876

0 commit comments

Comments
 (0)