Displaying 4 results from an estimated 4 matches for "stringexprast".
2013 Apr 20
2
[LLVMdev] How to cast Value* to ConstantDataArray*
I extended the LLVM Kaleidoscope example to support Strings. I added a
StringExprAST, which has the virtual Codegen method impl as follows:
Value *StringExprAST::Codegen() {
StringRef r(Val);
return ConstantDataArray::getString(getGlobalContext(), r, false);
}
I am trying to concatenate Strings and have a ConcatExprAST with its
Codegen method. Upon trying to access the data i...
2013 Apr 21
2
[LLVMdev] How to cast Value* to ConstantDataArray*
...in
On Sat, Apr 20, 2013 at 3:37 PM, Sean Silva <silvas at purdue.edu> wrote:
>
>
>
> On Sat, Apr 20, 2013 at 5:15 PM, Richard Catlin <
> richard.m.catlin at gmail.com> wrote:
>
>> I extended the LLVM Kaleidoscope example to support Strings. I added a
>> StringExprAST, which has the virtual Codegen method impl as follows:
>>
>> Value *StringExprAST::Codegen() {
>> StringRef r(Val);
>> return ConstantDataArray::getString(getGlobalContext(), r, false);
>> }
>>
>> I am trying to concatenate Strings and have a ConcatExpr...
2013 Apr 20
0
[LLVMdev] How to cast Value* to ConstantDataArray*
On Sat, Apr 20, 2013 at 5:15 PM, Richard Catlin
<richard.m.catlin at gmail.com>wrote:
> I extended the LLVM Kaleidoscope example to support Strings. I added a
> StringExprAST, which has the virtual Codegen method impl as follows:
>
> Value *StringExprAST::Codegen() {
> StringRef r(Val);
> return ConstantDataArray::getString(getGlobalContext(), r, false);
> }
>
> I am trying to concatenate Strings and have a ConcatExprAST with its
> Codegen me...
2013 Mar 26
0
[LLVMdev] Fwd: Extending Kaleidoscope to support Strings
...scope as the base framework to write a source to source
compiler. Our source language has Strings with supported operations such
as concatenation, upper case, and substrings.
I am following the patterns set forth in Kaleidoscope, and need to
represent my std::string as a Value *.
I have:
Value *StringExprAST::Codegen() {
StringRef r(Val); // Val is a std::string captured by the parser
return ConstantDataArray::getString(getGlobalContext(), r);
}
For a test string of "Hello World!", I am trying to create an Alloca * and
store the InitVal, which I get from codegen of StringExprAST.
uint6...