[llvm] r358821 - [JITLink] Silence a narrowing conversion warning.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 20 10:37:09 PDT 2019


Author: lhames
Date: Sat Apr 20 10:37:09 2019
New Revision: 358821

URL: http://llvm.org/viewvc/llvm-project?rev=358821&view=rev
Log:
[JITLink] Silence a narrowing conversion warning.

Modified:
    llvm/trunk/include/llvm/ExecutionEngine/JITLink/JITLink.h

Modified: llvm/trunk/include/llvm/ExecutionEngine/JITLink/JITLink.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/JITLink/JITLink.h?rev=358821&r1=358820&r2=358821&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/JITLink/JITLink.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/JITLink/JITLink.h Sat Apr 20 10:37:09 2019
@@ -381,7 +381,7 @@ public:
     assert(!Parent.isZeroFill() && "Trying to get content for zero-fill atom");
     assert(Size <= std::numeric_limits<size_t>::max() &&
            "Content size too large");
-    return {ContentPtr, Size};
+    return {ContentPtr, static_cast<size_t>(Size)};
   }
   void setContent(StringRef Content) {
     assert(!Parent.isZeroFill() && "Calling setContent on zero-fill atom?");




More information about the llvm-commits mailing list