diff options
author | Mircea Trofin <mtrofin@google.com> | 2024-05-07 23:25:33 -0700 |
---|---|---|
committer | Mircea Trofin <mtrofin@google.com> | 2024-05-07 23:27:54 -0700 |
commit | 8755d24cb34b902557469445e1983850e0ce7cc7 (patch) | |
tree | 91b39c5b925c5ce8340cb1311db81b6578ddb07e | |
parent | a99ce615f19fec6fbb835490b89f53cba3cf9eff (diff) | |
download | llvm-8755d24cb34b902557469445e1983850e0ce7cc7.zip llvm-8755d24cb34b902557469445e1983850e0ce7cc7.tar.gz llvm-8755d24cb34b902557469445e1983850e0ce7cc7.tar.bz2 |
[compiler-rt][ctx_profile] Fix signed-ness warnings in test
Follow-up from PR ##89838. Some build bots warn-as-error
about signed/unsigned comparison in CtxInstrProfilingTest.
Example: https://lab.llvm.org/buildbot/#/builders/37/builds/34610
-rw-r--r-- | compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp b/compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp index f6ebe6a..1e96aea 100644 --- a/compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp +++ b/compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp @@ -178,19 +178,19 @@ TEST_F(ContextTest, Dump) { bool write(const ContextNode &Node) { EXPECT_FALSE(Root->Taken.TryLock()); - EXPECT_EQ(Node.guid(), 1); + EXPECT_EQ(Node.guid(), 1U); EXPECT_EQ(Node.counters()[0], Entries); - EXPECT_EQ(Node.counters_size(), 10); - EXPECT_EQ(Node.callsites_size(), 4); + EXPECT_EQ(Node.counters_size(), 10U); + EXPECT_EQ(Node.callsites_size(), 4U); EXPECT_EQ(Node.subContexts()[0], nullptr); EXPECT_EQ(Node.subContexts()[1], nullptr); EXPECT_NE(Node.subContexts()[2], nullptr); EXPECT_EQ(Node.subContexts()[3], nullptr); const auto &SN = *Node.subContexts()[2]; - EXPECT_EQ(SN.guid(), 2); + EXPECT_EQ(SN.guid(), 2U); EXPECT_EQ(SN.counters()[0], Entries); - EXPECT_EQ(SN.counters_size(), 3); - EXPECT_EQ(SN.callsites_size(), 1); + EXPECT_EQ(SN.counters_size(), 3U); + EXPECT_EQ(SN.callsites_size(), 1U); EXPECT_EQ(SN.subContexts()[0], nullptr); State = true; return true; |