diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-05-30 08:26:13 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-05-30 08:26:13 +0000 |
commit | efcaa42c282ae6c6ba9652c48738c334878afbc6 (patch) | |
tree | 05255ae597b058c11cb2bbcc9d6c352b2fe7b208 | |
parent | 8949477ae43883f229717f65763e5c502fd914c7 (diff) |
Properly document the second form of ConstArray::get()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28553 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Constants.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index f0f8146c75..dc7e698cf6 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -345,6 +345,13 @@ protected: public: /// get() - Static factory methods - Return objects of the specified value static Constant *get(const ArrayType *T, const std::vector<Constant*> &); + + /// This method constructs a ConstantArray and initializes it with a text + /// string. The default behavior (len==0) causes the null terminator to + /// be copied as well. However, in some situations this is not desired so + /// if len <= Initializer.length() (but not 0) then only that portion of + /// the string is copied and there is no null termination. If len > + /// than Initializer's length then the function asserts out (don't do that). static Constant *get(const std::string &Initializer, unsigned len = 0); /// getType - Specialize the getType() method to always return an ArrayType, |