forked from OSchip/llvm-project
parent
c79304461a
commit
e9bc2ba256
|
@ -539,7 +539,7 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV,
|
|||
Out << "zeroinitializer";
|
||||
} else if (const ConstantArray *CA = dyn_cast<ConstantArray>(CV)) {
|
||||
// As a special case, print the array as a string if it is an array of
|
||||
// ubytes or an array of sbytes with positive values.
|
||||
// i8 with ConstantInt values.
|
||||
//
|
||||
const Type *ETy = CA->getType()->getElementType();
|
||||
if (CA->isString()) {
|
||||
|
|
|
@ -1605,10 +1605,9 @@ bool CastInst::isLosslessCast() const {
|
|||
/// changed in order to effect the cast. Essentially, it identifies cases where
|
||||
/// no code gen is necessary for the cast, hence the name no-op cast. For
|
||||
/// example, the following are all no-op casts:
|
||||
/// # bitcast uint %X, int
|
||||
/// # bitcast uint* %x, sbyte*
|
||||
/// # bitcast vector< 2 x int > %x, vector< 4 x short>
|
||||
/// # ptrtoint uint* %x, uint ; on 32-bit plaforms only
|
||||
/// # bitcast i32* %x to i8*
|
||||
/// # bitcast <2 x i32> %x to <4 x i16>
|
||||
/// # ptrtoint i32* %x to i32 ; on 32-bit plaforms only
|
||||
/// @brief Determine if a cast is a no-op.
|
||||
bool CastInst::isNoopCast(const Type *IntPtrTy) const {
|
||||
switch (getOpcode()) {
|
||||
|
|
Loading…
Reference in New Issue