//===----------------------------------------------------------------------===//
// StructType Helper functions.
-// FIXME: Remove this version.
-StructType *StructType::get(LLVMContext &Context, ArrayRef<const Type*>Elements,
- bool isPacked) {
- return get(Context, ArrayRef<Type*>(const_cast<Type**>(Elements.data()),
- Elements.size()), isPacked);
-}
-
StructType *StructType::get(LLVMContext &Context, bool isPacked) {
- return get(Context, llvm::ArrayRef<const Type*>(), isPacked);
+ return get(Context, llvm::ArrayRef<Type*>(), isPacked);
}
-StructType *StructType::get(const Type *type, ...) {
+StructType *StructType::get(Type *type, ...) {
assert(type != 0 && "Cannot create a struct type with no elements with this");
LLVMContext &Ctx = type->getContext();
va_list ap;
- SmallVector<const llvm::Type*, 8> StructFields;
+ SmallVector<llvm::Type*, 8> StructFields;
va_start(ap, type);
while (type) {
StructFields.push_back(type);