Displaying 4 results from an estimated 4 matches for "rcatlin1".
Did you mean:
catlin
2013 Apr 21
2
[LLVMdev] How to cast Value* to ConstantDataArray*
ConstantDataArray * cda = cast<ConstantDataArray>(v);
throws this error: Assertion failed: (isa<X>(Val) && "cast<Ty>() argument
of incompatible type!"), function cast, file
/Users/rcatlin1/lldb/llvm/include/llvm/Support/Casting.h, line 208
Thanks for the help.
Richard Catlin
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:
>
>...
2013 Mar 26
0
[LLVMdev] Fwd: Extending Kaleidoscope to support Strings
...e(InitVal, Alloca);
I get the following error:
tok_string: "Hello World!"
Assertion failed: (getOperand(0)->getType() ==
cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must
be a pointer to Val type!"), function AssertOK, file
/Users/rcatlin1/lldb/llvm/lib/IR/Instructions.cpp, line 1089.
Thanks for any guidance.
Regards,
Richard Catlin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130325/39d3da8c/attachment.html>
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);
> }
>
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 in the