[llvm] 512f008 - Fix MSVC "'type cast': conversion from 'unsigned int' to 'const llvm::CallBase *' of greater size" warning. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 02:43:08 PST 2021


Author: Simon Pilgrim
Date: 2021-03-11T10:40:46Z
New Revision: 512f008ad9a98a2beb4dcdfba9d2cf521dd2c3fa

URL: https://github.com/llvm/llvm-project/commit/512f008ad9a98a2beb4dcdfba9d2cf521dd2c3fa
DIFF: https://github.com/llvm/llvm-project/commit/512f008ad9a98a2beb4dcdfba9d2cf521dd2c3fa.diff

LOG: Fix MSVC "'type cast': conversion from 'unsigned int' to 'const llvm::CallBase *' of greater size" warning. NFCI.

Added: 
    

Modified: 
    llvm/unittests/Transforms/IPO/AttributorTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Transforms/IPO/AttributorTest.cpp b/llvm/unittests/Transforms/IPO/AttributorTest.cpp
index e16fed11a375..458b68b2465c 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


        


More information about the llvm-commits mailing list