diff options
Diffstat (limited to 'CodeGen')
-rw-r--r-- | CodeGen/CGExprScalar.cpp | 3 | ||||
-rw-r--r-- | CodeGen/CodeGenFunction.h | 2 | ||||
-rw-r--r-- | CodeGen/CodeGenModule.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/CodeGen/CGExprScalar.cpp b/CodeGen/CGExprScalar.cpp index a72a4e98cf..012cb69c32 100644 --- a/CodeGen/CGExprScalar.cpp +++ b/CodeGen/CGExprScalar.cpp @@ -536,7 +536,8 @@ Value *ScalarExprEmitter::EmitSizeAlignOf(QualType TypeToSize, assert(RetType->isIntegerType() && "Result type must be an integer!"); - unsigned ResultWidth = static_cast<unsigned>(CGF.getContext().getTypeSize(RetType,SourceLocation())); + uint32_t ResultWidth = static_cast<uint32_t>( + CGF.getContext().getTypeSize(RetType, SourceLocation())); return llvm::ConstantInt::get(llvm::APInt(ResultWidth, Val)); } diff --git a/CodeGen/CodeGenFunction.h b/CodeGen/CodeGenFunction.h index abb03ab9c0..3e08461efa 100644 --- a/CodeGen/CodeGenFunction.h +++ b/CodeGen/CodeGenFunction.h @@ -219,7 +219,7 @@ public: llvm::Instruction *AllocaInsertPt; const llvm::Type *LLVMIntTy; - unsigned LLVMPointerWidth; + uint32_t LLVMPointerWidth; private: /// LocalDeclMap - This keeps track of the LLVM allocas or globals for local C diff --git a/CodeGen/CodeGenModule.cpp b/CodeGen/CodeGenModule.cpp index e14b738a31..8cb138ebff 100644 --- a/CodeGen/CodeGenModule.cpp +++ b/CodeGen/CodeGenModule.cpp @@ -67,7 +67,7 @@ void CodeGenModule::EmitGlobalVar(const FileVarDecl *D) { if (D->getInit() == 0) { Init = llvm::Constant::getNullValue(GV->getType()->getElementType()); } else if (D->getType()->isIntegerType()) { - llvm::APSInt Value(static_cast<unsigned>( + llvm::APSInt Value(static_cast<uint32_t>( getContext().getTypeSize(D->getInit()->getType(), SourceLocation()))); if (D->getInit()->isIntegerConstantExpr(Value, Context)) Init = llvm::ConstantInt::get(Value); |