diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-30 23:03:37 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-30 23:03:37 +0000 |
commit | 9e9a0d5fc26878e51a58a8b57900fcbf952c2691 (patch) | |
tree | 477eb7b58abe6134ff6accc805279396a77892e8 /include/llvm | |
parent | 124e6eb09d47674a4bac48a522e83e4513a970e5 (diff) | |
download | external_llvm-9e9a0d5fc26878e51a58a8b57900fcbf952c2691.tar.gz external_llvm-9e9a0d5fc26878e51a58a8b57900fcbf952c2691.tar.bz2 external_llvm-9e9a0d5fc26878e51a58a8b57900fcbf952c2691.zip |
Move more code back to 2.5 APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Constants.h | 2 | ||||
-rw-r--r-- | include/llvm/LLVMContext.h | 13 | ||||
-rw-r--r-- | include/llvm/Support/IRBuilder.h | 2 |
3 files changed, 5 insertions, 12 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index e8ecfa3bad..dfcc707b5e 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -305,6 +305,8 @@ protected: return User::operator new(s, 0); } public: + static ConstantAggregateZero* get(const Type* Ty); + /// isNullValue - Return true if this is the value that would be returned by /// getNullValue. virtual bool isNullValue() const { return true; } diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h index 00a6581dab..ab2df1b70a 100644 --- a/include/llvm/LLVMContext.h +++ b/include/llvm/LLVMContext.h @@ -60,6 +60,7 @@ class LLVMContext { friend class ConstantStruct; friend class ConstantArray; friend class ConstantVector; + friend class ConstantAggregateZero; public: LLVMContext(); ~LLVMContext(); @@ -72,19 +73,10 @@ public: /// @brief Get the all ones value Constant* getAllOnesValue(const Type* Ty); - // UndefValue accessors - UndefValue* getUndef(const Type* Ty); - // ConstantInt accessors ConstantInt* getTrue(); ConstantInt* getFalse(); - - // ConstantPointerNull accessors - ConstantPointerNull* getConstantPointerNull(const PointerType* T); - - // ConstantAggregateZero accessors - ConstantAggregateZero* getConstantAggregateZero(const Type* Ty); - + // MDNode accessors MDNode* getMDNode(Value* const* Vals, unsigned NumVals); @@ -95,7 +87,6 @@ public: // Methods for erasing constants void erase(MDString *M); void erase(MDNode *M); - void erase(ConstantAggregateZero *Z); }; /// FOR BACKWARDS COMPATIBILITY - Returns a global context. diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h index 058a9bbd1e..223fe028e2 100644 --- a/include/llvm/Support/IRBuilder.h +++ b/include/llvm/Support/IRBuilder.h @@ -146,7 +146,7 @@ public: /// ReturnInst *CreateAggregateRet(Value * const* retVals, unsigned N) { const Type *RetType = BB->getParent()->getReturnType(); - Value *V = Context.getUndef(RetType); + Value *V = UndefValue::get(RetType); for (unsigned i = 0; i != N; ++i) V = CreateInsertValue(V, retVals[i], i, "mrv"); return Insert(ReturnInst::Create(V)); |