X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FVMCore%2FConstants.cpp;h=470e247e4cc464aec9687b63b3d59537082a8527;hb=66a1a05c86721b2769ef107d39675afe3c79b913;hp=964d8880e87b625d3cc67a2a30a0c5ac9e375033;hpb=fe63fb986dc9510c5d68f2442edab9574e9e50d0;p=oota-llvm.git diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 964d8880e87..470e247e4cc 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -2,8 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // @@ -225,7 +225,7 @@ ConstantInt *ConstantInt::get(const Type *Ty, uint64_t V, bool isSigned) { } // Get a ConstantInt from an APInt. Note that the value stored in the DenseMap -// as the key, is a DensMapAPIntKeyInfo::KeyTy which has provided the +// as the key, is a DenseMapAPIntKeyInfo::KeyTy which has provided the // operator== and operator!= to ensure that the DenseMap doesn't attempt to // compare APInt's of different widths, which would violate an APInt class // invariant which generates an assertion. @@ -1510,7 +1510,7 @@ static ManagedStatic > ExprConstants; /// This is a utility function to handle folding of casts and lookup of the -/// cast in the ExprConstants map. It is usedby the various get* methods below. +/// cast in the ExprConstants map. It is used by the various get* methods below. static inline Constant *getFoldedCast( Instruction::CastOps opc, Constant *C, const Type *Ty) { assert(Ty->isFirstClassType() && "Cannot cast to an aggregate type!"); @@ -1710,7 +1710,7 @@ Constant *ConstantExpr::getSizeOf(const Type *Ty) { // sizeof is implemented as: (i64) gep (Ty*)null, 1 Constant *GEPIdx = ConstantInt::get(Type::Int32Ty, 1); Constant *GEP = - getGetElementPtr(getNullValue(PointerType::get(Ty)), &GEPIdx, 1); + getGetElementPtr(getNullValue(PointerType::getUnqual(Ty)), &GEPIdx, 1); return getCast(Instruction::PtrToInt, GEP, Type::Int64Ty); }