Fix MSVC "'type cast': conversion from 'unsigned int' to 'const llvm::CallBase *...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 11 Mar 2021 10:40:11 +0000 (10:40 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 11 Mar 2021 10:40:46 +0000 (10:40 +0000)
llvm/unittests/Transforms/IPO/AttributorTest.cpp

index e16fed1..458b68b 100644 (file)
@@ -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