[llvm-commits] CVS: llvm/include/llvm/Constants.h
Reid Spencer
reid at x10sys.com
Tue May 30 01:23:32 PDT 2006
Changes in directory llvm/include/llvm:
Constants.h updated: 1.80 -> 1.81
---
Log message:
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.
---
Diffs of the changes: (+1 -1)
Constants.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/include/llvm/Constants.h
diff -u llvm/include/llvm/Constants.h:1.80 llvm/include/llvm/Constants.h:1.81
--- llvm/include/llvm/Constants.h:1.80 Wed May 24 14:21:13 2006
+++ llvm/include/llvm/Constants.h Tue May 30 03:23:18 2006
@@ -345,7 +345,7 @@
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.
More information about the llvm-commits
mailing list