search for: skvort

Displaying 6 results from an estimated 6 matches for "skvort".

Did you mean: skvorts
2011 Feb 08
1
[LLVMdev] Question about linker error
Hello all, When extending the tutorial to support global variables I'm getting the following linker error: glob.o:glob.cpp:(.text+0x12241): undefined reference to `vtable for GlobalExprAST' collect2: ld returned 1 exit status GlobalExprAST class is: /// GlobalExprAST - Expression class for globals class GlobalExprAST : public ExprAST { std::string Name; ExprAST *Init; public:
2011 Feb 13
3
[LLVMdev] conversion from 'const llvm::Value*' to 'llvm::Constant*'
Oh, I thought that after "codegening" cos(0) would get me double 1.0 (assigment is working for anything like: global a = 1/3 + 2 /3 for example) What would be the best way to make assigments involving functions, like global a = cos(0); without getting the assertion arising from InitVal = cast<Constant>(Init->Codegen()); ? I made some changes and now my code basically works,
2011 Feb 12
2
[LLVMdev] conversion from 'const llvm::Value*' to 'llvm::Constant*'
Hi Apolagize if this newbie question has some obvious answer. When running something like ... ExprAST *Init = GlobalNames[i].second; const Value *InitVal; InitVal = Init->Codegen(); GlobalVariable * globvar = new GlobalVariable(*TheModule, InitVal->getType(), false, llvm::GlobalValue::ExternalLinkage, InitVal, Twine(GlobalName)); ... I'm getting the following error error: invalid
2011 Feb 12
0
[LLVMdev] conversion from 'const llvm::Value*' to 'llvm::Constant*'
Hi Anton, > I'm getting the following error > > error: invalid conversion from `const llvm::Value*' to `llvm::Constant*' > > How may I make this conversion? Any help would be much appreciated! cast<Constant>(whatever) Ciao, Duncan.
2011 Feb 13
2
[LLVMdev] conversion from 'const llvm::Value*' to 'llvm::Constant*'
...lue *InitVal; InitVal = Init->Codegen(); GlobalVariable * globval = *new* *GlobalVariable*(*TheModule, InitVal->getType(), *false*, llvm::GlobalValue::*ExternalLinkage*, cast<Constant>(InitVal), Twine(GlobalName) ); Any help, as always, would be really much appreciated! Anton Skvorts 2011/2/12 Duncan Sands <baldrick at free.fr> > Hi Anton, > > > I'm getting the following error > > > > error: invalid conversion from `const llvm::Value*' to > `llvm::Constant*' > > > > How may I make this conversion? Any help would...
2010 Nov 22
0
[LLVMdev] Emitting LLVM IR for control flow
Hi I'm following the excellent Kaleidoscope tutorial to learn how to build an interpreter using LLVM. Apologize if this list is not the best place to post beginner's questions. In Kaleidoscope 2.7 when I run def binary : 1 (x y) y; def testfor (x) (for c = 1, c<2 in x = x +1 ) : x; testfor(1) unexpectadly get 3.000000 instead of 2.000000. This happens, I believe, because the