diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-05-30 08:23:18 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-05-30 08:23:18 +0000 |
commit | 8949477ae43883f229717f65763e5c502fd914c7 (patch) | |
tree | acf687ae43159ccc602c7964846f7db8e6fb6546 /include | |
parent | 5a622f2e06e6f579c11875bb895328e71e286636 (diff) | |
download | external_llvm-8949477ae43883f229717f65763e5c502fd914c7.zip external_llvm-8949477ae43883f229717f65763e5c502fd914c7.tar.gz external_llvm-8949477ae43883f229717f65763e5c502fd914c7.tar.bz2 |
Adjust the interface to ConstantArray::get. The previous
implementation always added a null byte to the end of the string. It turns
out that this is not always wanted. By adding a length parameter we preserve
this behavior when length==0 (default value) but also allow other lengths
(not null terminated) to be created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28552 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Constants.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index d555d3e..f0f8146 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -345,7 +345,7 @@ protected: public: /// get() - Static factory methods - Return objects of the specified value static Constant *get(const ArrayType *T, const std::vector<Constant*> &); - static Constant *get(const std::string &Initializer); + static Constant *get(const std::string &Initializer, unsigned len = 0); /// getType - Specialize the getType() method to always return an ArrayType, /// which reduces the amount of casting needed in parts of the compiler. |