summaryrefslogtreecommitdiff
path: root/lib/VMCore/Type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Type.cpp')
-rw-r--r--lib/VMCore/Type.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index 40d232a619..10467a8d90 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -458,22 +458,15 @@ void StructType::setName(StringRef Name) {
//===----------------------------------------------------------------------===//
// 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);