[llvm] r327896 - Add cast to Type*, fix failure from r327894.
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 19 13:05:01 PDT 2018
Author: asbirlea
Date: Mon Mar 19 13:05:01 2018
New Revision: 327896
URL: http://llvm.org/viewvc/llvm-project?rev=327896&view=rev
Log:
Add cast to Type*, fix failure from r327894.
Modified:
llvm/trunk/include/llvm/IR/Type.h
Modified: llvm/trunk/include/llvm/IR/Type.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Type.h?rev=327896&r1=327895&r2=327896&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Type.h (original)
+++ llvm/trunk/include/llvm/IR/Type.h Mon Mar 19 13:05:01 2018
@@ -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:
More information about the llvm-commits
mailing list