Displaying 3 results from an estimated 3 matches for "textlengthbefor".
Did you mean:
textlengthbefore
2010 Jul 16
2
[LLVMdev] Strange behavior when converting arrays to strings
Hello,
I found saw some strange behavior (to me) when converting constant arrays to strings. Consider the following example:
std::string Text = "HelloWorld";
unsigned TextLengthBefore = Text.length();
ConstantArray *pArray = dyn_cast<ConstantArray>(llvm::ConstantArray::get(pModule->getContext(), Text, true));
unsigned NumElements = pArray->getNumOperands();
Text = pArray->getAsString();
unsigned TextLengthAfter = Text.length();
After running this example...
2010 Jul 28
0
[LLVMdev] Strange behavior when converting arrays to strings
...ly 16, 2010 3:20 PM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] Strange behavior when converting arrays to strings
Hello,
I found saw some strange behavior (to me) when converting constant arrays to strings. Consider the following example:
std::string Text = "HelloWorld";
unsigned TextLengthBefore = Text.length();
ConstantArray *pArray = dyn_cast<ConstantArray>(llvm::ConstantArray::get(pModule->getContext(), Text, true));
unsigned NumElements = pArray->getNumOperands();
Text = pArray->getAsString();
unsigned TextLengthAfter = Text.length();
After running this example...
2010 Jul 28
1
[LLVMdev] Strange behavior when converting arrays to strings
Hi Javier,
> I found saw some strange behavior (to me) when converting constant
> arrays to strings. Consider the following example:
>
> std::string Text = "HelloWorld";
>
> unsigned TextLengthBefore = Text.length();
>
> ConstantArray *pArray =
> dyn_cast<ConstantArray>(llvm::ConstantArray::get(pModule->getContext(),
> Text, true));
from Constants.h:
/// This method constructs a ConstantArray and initializes it with a text
/// string. The default behavior (AddNull=...