Displaying 13 results from an estimated 13 matches for "prototypeast".
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...T - Expression class for function calls.
class CallExprAST : public ExprAST {
std::string Callee;
std::vector<ExprAST*> Args;
public:
CallExprAST(const std::string &callee, std::vector<ExprAST*> &args)
: Callee(callee), Args(args) {}
virtual Value *Codegen();
};
/// PrototypeAST - This class represents the "prototype" for a function,
/// which captures its argument names as well as if it is an operator.
class PrototypeAST {
std::string Name;
std::vector<std::string> Args;
public:
PrototypeAST(const std::string &name, const std::vector<std::stri...
2010 Feb 07
3
[LLVMdev] Help with Mac OS X 10.6.2 build
...vm::LLVMContext&, llvm::Twine
const&, llvm::Function*, llvm::BasicBlock*)", referenced from:
FunctionAST::Codegen() in ccHkdHVT.o
"llvm::Module::getFunction(llvm::StringRef const&) const", referenced from:
CallExprAST::Codegen() in ccHkdHVT.o
PrototypeAST::Codegen() in ccHkdHVT.o
"llvm::Value::getName() const", referenced from:
PrototypeAST::Codegen() in ccHkdHVT.o
"llvm::Function::Function(llvm::FunctionType const*,
llvm::GlobalValue::LinkageTypes, llvm::Twine const&, llvm::Module*)",
referenced from:...
2010 Feb 17
0
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...; class CallExprAST : public ExprAST {
> std::string Callee;
> std::vector<ExprAST*> Args;
> public:
> CallExprAST(const std::string &callee, std::vector<ExprAST*> &args)
> : Callee(callee), Args(args) {}
> virtual Value *Codegen();
> };
>
> /// PrototypeAST - This class represents the "prototype" for a function,
> /// which captures its argument names as well as if it is an operator.
> class PrototypeAST {
> std::string Name;
> std::vector<std::string> Args;
> public:
> PrototypeAST(const std::string &name, con...
2008 Feb 22
1
[LLVMdev] tutorial typos
There were some typos in the tutorial. This patch should fix them:
index b7f968b..50619e0 100644
--- a/docs/tutorial/LangImpl2.html
+++ b/docs/tutorial/LangImpl2.html
@@ -933,7 +933,7 @@ public:
/// of arguments the function takes).
class PrototypeAST {
std::string Name;
- std::vector< Args;
+ std::vector<std::string> Args;
public:
PrototypeAST(const std::string &name, const
std::vector<std::string> &args)
: Name(name), Args(args) {}
@@ -1132,7 +1132,7 @@ static FunctionAST *ParseD...
2010 Feb 17
1
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...{
>> std::string Callee;
>> std::vector<ExprAST*> Args;
>> public:
>> CallExprAST(const std::string &callee, std::vector<ExprAST*> &args)
>> : Callee(callee), Args(args) {}
>> virtual Value *Codegen();
>> };
>>
>> /// PrototypeAST - This class represents the "prototype" for a function,
>> /// which captures its argument names as well as if it is an operator.
>> class PrototypeAST {
>> std::string Name;
>> std::vector<std::string> Args;
>> public:
>> PrototypeAST(const st...
2010 Feb 07
0
[LLVMdev] Help with Mac OS X 10.6.2 build
...wine
> const&, llvm::Function*, llvm::BasicBlock*)", referenced from:
> FunctionAST::Codegen() in ccHkdHVT.o
> "llvm::Module::getFunction(llvm::StringRef const&) const", referenced from:
> CallExprAST::Codegen() in ccHkdHVT.o
> PrototypeAST::Codegen() in ccHkdHVT.o
> "llvm::Value::getName() const", referenced from:
> PrototypeAST::Codegen() in ccHkdHVT.o
> "llvm::Function::Function(llvm::FunctionType const*,
> llvm::GlobalValue::LinkageTypes, llvm::Twine const&, llvm::Module*)"...
2008 Apr 15
2
[LLVMdev] Bugs in Kaleidoscope tutorial code, and a bus error
...that has me stumped:
-------
In the code listed in LLVM Tutorial section 2.2 Implementing a Parser and AST.
Line 19 has a comma at the end of line that shouldn't be there
Line 120 is missing a closing angle bracket.
Line 120 should be std::vector<std::string> Args;
Line 319 should be PrototypeAST *Proto = new PrototypeAST("",
std::vector<std::string>());
-------
Likewise, in the code for LLVM Tutorial section 2.3 Code Generation to LLVM IR,
Line 27 has a comma at the end of line that shouldn't be there
-------
Likewise, in the code for LLVM Tutorial section 2.4 Ad...
2007 Nov 05
0
[LLVMdev] 'Implementing a language with LLVM' tutorial
Nice work, Chris! This is a much needed tutorial. Some comments:
-- It would be helpful to add some navigation links at the top and
bottom of the pages.
-- Not clear why PrototypeAST::Codegen returns a Function* instead of
a Value* like the other CodeGen methods?
-- It can be convenient to use Visitor methods on the AST classes for
code generation, instead of hard-coding the CodeGen methods into the
AST classes. Many languages will need other traversals besides the
Co...
2010 Jan 04
4
[LLVMdev] Getting Kaleidoscope to compile
...alContext’ was not declared in this scope
toy.cpp: In member function ‘virtual llvm::Value* BinaryExprAST::Codegen()’:
toy.cpp:379: error: ‘getDoubleTy’ is not a member of ‘llvm::Type’
toy.cpp:379: error: ‘getGlobalContext’ was not declared in this scope
toy.cpp: In member function ‘llvm::Function* PrototypeAST::Codegen()’:
toy.cpp:407: error: ‘getDoubleTy’ is not a member of ‘llvm::Type’
toy.cpp:407: error: ‘getGlobalContext’ was not declared in this scope
toy.cpp:408: error: ‘getDoubleTy’ is not a member of ‘llvm::Type’
toy.cpp: In member function ‘llvm::Function* FunctionAST::Codegen()’:
toy.cpp:454: e...
2007 Nov 05
2
[LLVMdev] 'Implementing a language with LLVM' tutorial
On Mon, 5 Nov 2007, Vikram S. Adve wrote:
> -- It would be helpful to add some navigation links at the top and bottom of
> the pages.
I added a TOC to each chapter, thanks.
> -- Not clear why PrototypeAST::Codegen returns a Function* instead of a
> Value* like the other CodeGen methods?
I clarified this in the text. The short version is that PrototypeAST
doesn't correspond to an expression value.
> -- It can be convenient to use Visitor methods on the AST classes for code
> genera...
2010 Jan 04
0
[LLVMdev] Getting Kaleidoscope to compile
...ed in this scope
> toy.cpp: In member function ‘virtual llvm::Value*
> BinaryExprAST::Codegen()’:
> toy.cpp:379: error: ‘getDoubleTy’ is not a member of ‘llvm::Type’
> toy.cpp:379: error: ‘getGlobalContext’ was not declared in this scope
> toy.cpp: In member function ‘llvm::Function* PrototypeAST::Codegen()’:
> toy.cpp:407: error: ‘getDoubleTy’ is not a member of ‘llvm::Type’
> toy.cpp:407: error: ‘getGlobalContext’ was not declared in this scope
> toy.cpp:408: error: ‘getDoubleTy’ is not a member of ‘llvm::Type’
> toy.cpp: In member function ‘llvm::Function* FunctionAST::Codege...
2007 Nov 05
13
[LLVMdev] 'Implementing a language with LLVM' tutorial
Hi All,
LLVM has long needed a tutorial for people who are interested in using
it to implement their favorite language and to demonstrate how to use
the JIT. To help solve this, I've put together a little tutorial that
runs through the implementation and extension of a toy language here:
http://llvm.org/docs/tutorial/
At this point, the tutorial is feature complete, but might
2010 Jan 04
2
[LLVMdev] Getting Kaleidoscope to compile
...;> toy.cpp: In member function ‘virtual llvm::Value*
>> BinaryExprAST::Codegen()’:
>> toy.cpp:379: error: ‘getDoubleTy’ is not a member of ‘llvm::Type’
>> toy.cpp:379: error: ‘getGlobalContext’ was not declared in this scope
>> toy.cpp: In member function ‘llvm::Function* PrototypeAST::Codegen()’:
>> toy.cpp:407: error: ‘getDoubleTy’ is not a member of ‘llvm::Type’
>> toy.cpp:407: error: ‘getGlobalContext’ was not declared in this scope
>> toy.cpp:408: error: ‘getDoubleTy’ is not a member of ‘llvm::Type’
>> toy.cpp: In member function ‘llvm::Function* Fun...