From 512f008ad9a98a2beb4dcdfba9d2cf521dd2c3fa Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 11 Mar 2021 10:40:11 +0000 Subject: [PATCH] Fix MSVC "'type cast': conversion from 'unsigned int' to 'const llvm::CallBase *' of greater size" warning. NFCI. --- llvm/unittests/Transforms/IPO/AttributorTest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/unittests/Transforms/IPO/AttributorTest.cpp b/llvm/unittests/Transforms/IPO/AttributorTest.cpp index e16fed1..458b68b 100644 --- a/llvm/unittests/Transforms/IPO/AttributorTest.cpp +++ b/llvm/unittests/Transforms/IPO/AttributorTest.cpp @@ -32,7 +32,8 @@ TEST_F(AttributorTestBase, IRPPositionCallBaseContext) { parseModule(ModuleString); Function *F = M->getFunction("foo"); - IRPosition Pos = IRPosition::function(*F, (const llvm::CallBase *)0xDEADBEEF); + IRPosition Pos = + IRPosition::function(*F, (const llvm::CallBase *)(uintptr_t)0xDEADBEEF); EXPECT_TRUE(Pos.hasCallBaseContext()); EXPECT_FALSE(Pos.stripCallBaseContext().hasCallBaseContext()); } @@ -72,4 +73,4 @@ TEST_F(AttributorTestBase, TestCast) { ASSERT_TRUE(SSucc); } -} // namespace llvm \ No newline at end of file +} // namespace llvm -- 2.7.4