X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FIR%2FDerivedTypes.h;h=694354ee3b27ac4946998ae265f6f212b42f0c89;hb=d4cdf1962b2242fb155ee2203199dd043725e7e1;hp=4a94499b4cf508606e7b1114f5431d4ee2527e8c;hpb=cd52a7a381a73c53ec4ef517ad87f19808cb1a28;p=oota-llvm.git diff --git a/include/llvm/IR/DerivedTypes.h b/include/llvm/IR/DerivedTypes.h index 4a94499b4cf..694354ee3b2 100644 --- a/include/llvm/IR/DerivedTypes.h +++ b/include/llvm/IR/DerivedTypes.h @@ -147,14 +147,14 @@ static_assert(AlignOf::Alignment >= AlignOf::Alignment, /// and VectorType. class CompositeType : public Type { protected: - explicit CompositeType(LLVMContext &C, TypeID tid) : Type(C, tid) { } -public: + explicit CompositeType(LLVMContext &C, TypeID tid) : Type(C, tid) {} +public: /// getTypeAtIndex - Given an index value into the type, return the type of /// the element. /// - Type *getTypeAtIndex(const Value *V); - Type *getTypeAtIndex(unsigned Idx); + Type *getTypeAtIndex(const Value *V) const; + Type *getTypeAtIndex(unsigned Idx) const; bool indexValid(const Value *V) const; bool indexValid(unsigned Idx) const; @@ -212,16 +212,13 @@ public: /// StructType::create - This creates an identified struct. static StructType *create(LLVMContext &Context, StringRef Name); static StructType *create(LLVMContext &Context); - - static StructType *create(ArrayRef Elements, - StringRef Name, - bool isPacked = false); - static StructType *create(ArrayRef Elements); - static StructType *create(LLVMContext &Context, - ArrayRef Elements, - StringRef Name, + + static StructType *create(ArrayRef Elements, StringRef Name, bool isPacked = false); - static StructType *create(LLVMContext &Context, ArrayRef Elements); + static StructType *create(ArrayRef Elements); + static StructType *create(LLVMContext &Context, ArrayRef Elements, + StringRef Name, bool isPacked = false); + static StructType *create(LLVMContext &Context, ArrayRef Elements); static StructType *create(StringRef Name, Type *elt1, ...) LLVM_END_WITH_NULL; /// StructType::get - This static method is the primary way to create a @@ -250,8 +247,8 @@ public: bool isOpaque() const { return (getSubclassData() & SCDB_HasBody) == 0; } /// isSized - Return true if this is a sized type. - bool isSized(SmallPtrSetImpl *Visited = nullptr) const; - + bool isSized(SmallPtrSetImpl *Visited = nullptr) const; + /// hasName - Return true if this is a named struct that has a non-empty name. bool hasName() const { return SymbolTableEntry != nullptr; }