OSDN Git Service

Add cast to Type*, fix failure from r327894.
authorAlina Sbirlea <asbirlea@google.com>
Mon, 19 Mar 2018 20:05:01 +0000 (20:05 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Mon, 19 Mar 2018 20:05:01 +0000 (20:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327896 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/Type.h

index 0b0a10f..39a7976 100644 (file)
@@ -410,7 +410,7 @@ public:
   template <typename ScalarTy> static Type *getScalarTy(LLVMContext &C) {
     int noOfBits = sizeof(ScalarTy) * CHAR_BIT;
     if (std::is_integral<ScalarTy>::value) {
-      return Type::getIntNTy(C, noOfBits);
+      return (Type*) Type::getIntNTy(C, noOfBits);
     } else if (std::is_floating_point<ScalarTy>::value) {
       switch (noOfBits) {
       case 32: