mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
fix typos/formatting; NFC
llvm-svn: 305243
This commit is contained in:
parent
429e34129f
commit
cb72dcdc5d
@ -249,8 +249,8 @@ template <typename T> class ArrayRef;
|
||||
};
|
||||
|
||||
/// Returns true if the value \p V is a pointer into a ContantDataArray.
|
||||
/// If successfull \p Index will point to a ConstantDataArray info object
|
||||
/// with an apropriate offset.
|
||||
/// If successful \p Index will point to a ConstantDataArray info object
|
||||
/// with an appropriate offset.
|
||||
bool getConstantDataArrayInfo(const Value *V, ConstantDataArraySlice &Slice,
|
||||
unsigned ElementSize, uint64_t Offset = 0);
|
||||
|
||||
|
@ -3026,7 +3026,7 @@ bool llvm::getConstantDataArrayInfo(const Value *V,
|
||||
if (GV->getInitializer()->isNullValue()) {
|
||||
Type *GVTy = GV->getValueType();
|
||||
if ( (ArrayTy = dyn_cast<ArrayType>(GVTy)) ) {
|
||||
// A zeroinitializer for the array; There is no ConstantDataArray.
|
||||
// A zeroinitializer for the array; there is no ConstantDataArray.
|
||||
Array = nullptr;
|
||||
} else {
|
||||
const DataLayout &DL = GV->getParent()->getDataLayout();
|
||||
|
@ -348,8 +348,7 @@ static Constant *ExtractConstantBytes(Constant *C, unsigned ByteStart,
|
||||
/// factors factored out. If Folded is false, return null if no factoring was
|
||||
/// possible, to avoid endlessly bouncing an unfoldable expression back into the
|
||||
/// top-level folder.
|
||||
static Constant *getFoldedSizeOf(Type *Ty, Type *DestTy,
|
||||
bool Folded) {
|
||||
static Constant *getFoldedSizeOf(Type *Ty, Type *DestTy, bool Folded) {
|
||||
if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
|
||||
Constant *N = ConstantInt::get(DestTy, ATy->getNumElements());
|
||||
Constant *E = getFoldedSizeOf(ATy->getElementType(), DestTy, true);
|
||||
@ -404,8 +403,7 @@ static Constant *getFoldedSizeOf(Type *Ty, Type *DestTy,
|
||||
/// factors factored out. If Folded is false, return null if no factoring was
|
||||
/// possible, to avoid endlessly bouncing an unfoldable expression back into the
|
||||
/// top-level folder.
|
||||
static Constant *getFoldedAlignOf(Type *Ty, Type *DestTy,
|
||||
bool Folded) {
|
||||
static Constant *getFoldedAlignOf(Type *Ty, Type *DestTy, bool Folded) {
|
||||
// The alignment of an array is equal to the alignment of the
|
||||
// array element. Note that this is not always true for vectors.
|
||||
if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
|
||||
@ -469,8 +467,7 @@ static Constant *getFoldedAlignOf(Type *Ty, Type *DestTy,
|
||||
/// any known factors factored out. If Folded is false, return null if no
|
||||
/// factoring was possible, to avoid endlessly bouncing an unfoldable expression
|
||||
/// back into the top-level folder.
|
||||
static Constant *getFoldedOffsetOf(Type *Ty, Constant *FieldNo,
|
||||
Type *DestTy,
|
||||
static Constant *getFoldedOffsetOf(Type *Ty, Constant *FieldNo, Type *DestTy,
|
||||
bool Folded) {
|
||||
if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
|
||||
Constant *N = ConstantExpr::getCast(CastInst::getCastOpcode(FieldNo, false,
|
||||
|
Loading…
Reference in New Issue
Block a user