[Lldb-commits] [lldb] r125436 - /lldb/branches/apple/calcite/lldb/source/Expression/IRForTarget.cpp

Greg Clayton gclayton at apple.com
Sat Feb 12 09:51:49 PST 2011


Author: gclayton
Date: Sat Feb 12 11:51:49 2011
New Revision: 125436

URL: http://llvm.org/viewvc/llvm-project?rev=125436&view=rev
Log:
Fixed constant objective C string use in expressions (part 1).


Modified:
    lldb/branches/apple/calcite/lldb/source/Expression/IRForTarget.cpp

Modified: lldb/branches/apple/calcite/lldb/source/Expression/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/calcite/lldb/source/Expression/IRForTarget.cpp?rev=125436&r1=125435&r2=125436&view=diff
==============================================================================
--- lldb/branches/apple/calcite/lldb/source/Expression/IRForTarget.cpp (original)
+++ lldb/branches/apple/calcite/lldb/source/Expression/IRForTarget.cpp Sat Feb 12 11:51:49 2011
@@ -484,7 +484,7 @@
     
     Constant *alloc_arg         = Constant::getNullValue(i8_ptr_ty);
     Constant *bytes_arg         = ConstantExpr::getBitCast(cstr, i8_ptr_ty);
-    Constant *numBytes_arg      = ConstantInt::get(intptr_ty, string_array->getType()->getNumElements(), false);
+    Constant *numBytes_arg      = ConstantInt::get(intptr_ty, string_array->getType()->getNumElements() - 1, false);
     Constant *encoding_arg      = ConstantInt::get(i32_ty, 0x0600, false); /* 0x0600 is kCFStringEncodingASCII */
     Constant *isExternal_arg    = ConstantInt::get(i8_ty, 0x0, false); /* 0x0 is false */
     





More information about the lldb-commits mailing list