diff options
| author | Owen Anderson <resistor@mac.com> | 2009-08-05 23:16:16 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-08-05 23:16:16 +0000 |
| commit | 03cb69fbd1ef003f94710f2d497515692ff5445a (patch) | |
| tree | 09edb1b4c08827055064fa639d024649076349d7 /llvm/include | |
| parent | e148ceaf65e3704935b8bf0fdc0c7f44283acf6c (diff) | |
| download | bcm5719-llvm-03cb69fbd1ef003f94710f2d497515692ff5445a.tar.gz bcm5719-llvm-03cb69fbd1ef003f94710f2d497515692ff5445a.zip | |
Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs.
llvm-svn: 78258
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/Constants.h | 6 | ||||
| -rw-r--r-- | llvm/include/llvm/DerivedTypes.h | 11 |
2 files changed, 11 insertions, 6 deletions
diff --git a/llvm/include/llvm/Constants.h b/llvm/include/llvm/Constants.h index 0785492335f..32eac7b4410 100644 --- a/llvm/include/llvm/Constants.h +++ b/llvm/include/llvm/Constants.h @@ -407,8 +407,10 @@ protected: public: // ConstantStruct accessors static Constant* get(const StructType* T, const std::vector<Constant*>& V); - static Constant* get(const std::vector<Constant*>& V, bool Packed = false); - static Constant* get(Constant* const *Vals, unsigned NumVals, + static Constant* get(LLVMContext &Context, + const std::vector<Constant*>& V, bool Packed = false); + static Constant* get(LLVMContext &Context, + Constant* const *Vals, unsigned NumVals, bool Packed = false); /// Transparently provide more efficient getOperand methods. diff --git a/llvm/include/llvm/DerivedTypes.h b/llvm/include/llvm/DerivedTypes.h index e2737bd3c7c..b50ee5549f6 100644 --- a/llvm/include/llvm/DerivedTypes.h +++ b/llvm/include/llvm/DerivedTypes.h @@ -31,6 +31,7 @@ class PointerValType; class VectorValType; class IntegerValType; class APInt; +struct LLVMContext; class DerivedType : public Type { friend class Type; @@ -240,20 +241,22 @@ public: /// StructType::get - This static method is the primary way to create a /// StructType. /// - static StructType *get(const std::vector<const Type*> &Params, + static StructType *get(LLVMContext &Context, + const std::vector<const Type*> &Params, bool isPacked=false); /// StructType::get - Create an empty structure type. /// - static StructType *get(bool isPacked=false) { - return get(std::vector<const Type*>(), isPacked); + static StructType *get(LLVMContext &Context, bool isPacked=false) { + return get(Context, std::vector<const Type*>(), isPacked); } /// StructType::get - This static method is a convenience method for /// creating structure types by specifying the elements as arguments. /// Note that this method always returns a non-packed struct. To get /// an empty struct, pass NULL, NULL. - static StructType *get(const Type *type, ...) END_WITH_NULL; + static StructType *get(LLVMContext &Context, + const Type *type, ...) END_WITH_NULL; /// isValidElementType - Return true if the specified type is valid as a /// element type. |

