[llvm-commits] [dragonegg] r133414 - in /dragonegg/trunk/src: Backend.cpp Constants.cpp Convert.cpp
Chris Lattner
sabre at nondot.org
Sun Jun 19 21:01:57 PDT 2011
Author: lattner
Date: Sun Jun 19 23:01:57 2011
New Revision: 133414
URL: http://llvm.org/viewvc/llvm-project?rev=133414&view=rev
Log:
Update to match mainline ConstantStruct::get API change (I hope)
Modified:
dragonegg/trunk/src/Backend.cpp
dragonegg/trunk/src/Constants.cpp
dragonegg/trunk/src/Convert.cpp
Modified: dragonegg/trunk/src/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Backend.cpp?rev=133414&r1=133413&r2=133414&view=diff
==============================================================================
--- dragonegg/trunk/src/Backend.cpp (original)
+++ dragonegg/trunk/src/Backend.cpp Sun Jun 19 23:01:57 2011
@@ -697,7 +697,7 @@
// __attribute__(constructor) can be on a function with any type. Make sure
// the pointer is void()*.
StructInit[1] = TheFolder->CreateBitCast(Tors[i].first, FPTy);
- InitList.push_back(ConstantStruct::get(Context, StructInit, false));
+ InitList.push_back(ConstantStruct::getAnon(Context, StructInit));
}
Constant *Array = ConstantArray::get(
ArrayType::get(InitList[0]->getType(), InitList.size()), InitList);
@@ -769,8 +769,7 @@
lineNo
};
- AttributeAnnotateGlobals.push_back(
- ConstantStruct::get(Context, Element, 4, false));
+ AttributeAnnotateGlobals.push_back(ConstantStruct::getAnon(Element));
}
// Get next annotate attribute.
Modified: dragonegg/trunk/src/Constants.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Constants.cpp?rev=133414&r1=133413&r2=133414&view=diff
==============================================================================
--- dragonegg/trunk/src/Constants.cpp (original)
+++ dragonegg/trunk/src/Constants.cpp Sun Jun 19 23:01:57 2011
@@ -521,7 +521,7 @@
ExtractRegisterFromConstantImpl(C, elt_type, StartingBit, Folder),
ExtractRegisterFromConstantImpl(C, elt_type, StartingBit + Stride, Folder)
};
- return ConstantStruct::get(Context, Vals, 2, false);
+ return ConstantStruct::getAnon(Vals);
}
case OFFSET_TYPE:
@@ -615,7 +615,7 @@
Real = RepresentAsMemory(Real, elt_type, Folder);
Imag = RepresentAsMemory(Imag, elt_type, Folder);
Constant *Vals[2] = { Real, Imag };
- Result = ConstantStruct::get(Context, Vals, 2, false);
+ Result = ConstantStruct::getAnon(Vals);
break;
}
@@ -644,7 +644,7 @@
}
// The elements may have funky types, so forming a vector may not always be
// possible.
- Result = ConstantStruct::get(Context, Vals, false);
+ Result = ConstantStruct::getAnon(Vals);
break;
}
@@ -839,8 +839,11 @@
unsigned PadBits = EltSize - ValSize;
assert(PadBits % BITS_PER_UNIT == 0 && "Non-unit type size?");
unsigned Units = PadBits / BITS_PER_UNIT;
- Constant *Padding = UndefValue::get(GetUnitType(Context, Units));
- Val = ConstantStruct::get(Context, false, Val, Padding, NULL);
+ Constant *Elts[] = {
+ Val, UndefValue::get(GetUnitType(Context, Units))
+ };
+
+ Val = ConstantStruct::getAnon(Elts);
}
// Get the index position of the element within the array. Note that this
@@ -926,7 +929,7 @@
// Return as a struct if the contents are not homogeneous.
if (UseStruct || Pack)
- return ConstantStruct::get(Context, Elts, Pack);
+ return ConstantStruct::getAnon(Context, Elts, Pack);
// Make the IR more pleasant by returning as a vector if the GCC type was a
// vector. However this is only correct if the initial values had the same
@@ -1214,7 +1217,7 @@
}
// Okay, we're done, return the computed elements.
- return ConstantStruct::get(Context, Elts, Pack);
+ return ConstantStruct::getAnon(Context, Elts, Pack);
}
static Constant *ConvertCONSTRUCTOR(tree exp, TargetFolder &Folder) {
Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=133414&r1=133413&r2=133414&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Sun Jun 19 23:01:57 2011
@@ -6206,7 +6206,7 @@
EmitRegisterConstant(TREE_REALPART(reg)),
EmitRegisterConstant(TREE_IMAGPART(reg))
};
- return ConstantStruct::get(Context, Elts, 2, false);
+ return ConstantStruct::getAnon(Elts);
}
/// EmitIntegerRegisterConstant - Turn the given INTEGER_CST into an LLVM
More information about the llvm-commits
mailing list