Displaying 3 results from an estimated 3 matches for "concatexprast".
2013 Apr 20
2
[LLVMdev] How to cast Value* to ConstantDataArray*
...e 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 in the ConstantDataArray, I
need to cast the Value* back to a ConstantDataArray* in order to use the
getAsString() method.
I tried:
ConstantDataArray * cda = cast<ConstantDataArray>(v);
where v is a Value*. It does not work.
How can...
2013 Apr 21
2
[LLVMdev] How to cast Value* to ConstantDataArray*
...ingExprAST, 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 in the ConstantDataArray, I
>> need to cast the Value* back to a ConstantDataArray* in order to use the
>> getAsString() method.
>>
>> I tried:
>>
>> ConstantDataArray * cda = cast<ConstantDataAr...
2013 Apr 20
0
[LLVMdev] How to cast Value* to ConstantDataArray*
...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 in the ConstantDataArray, I
> need to cast the Value* back to a ConstantDataArray* in order to use the
> getAsString() method.
>
> I tried:
>
> ConstantDataArray * cda = cast<ConstantDataArray>(v);
>
> where...