From e9e1f5703dd43b850735397bd005173a8ae9831d Mon Sep 17 00:00:00 2001 From: Siu Kwan Lam Date: Wed, 23 Jan 2013 15:25:04 -0600 Subject: [PATCH] Add Value, User, Constant --- newbinding/Makefile | 2 ++ newbinding/src/Constant.py | 5 +++++ newbinding/src/User.py | 5 +++++ newbinding/src/Value.py | 8 ++++++++ 4 files changed, 20 insertions(+) create mode 100644 newbinding/src/Constant.py create mode 100644 newbinding/src/User.py create mode 100644 newbinding/src/Value.py diff --git a/newbinding/Makefile b/newbinding/Makefile index 6ae50be..d07bc8f 100644 --- a/newbinding/Makefile +++ b/newbinding/Makefile @@ -1,8 +1,10 @@ PYTHON = python PYMODS = raw_ostream SmallVector Type DerivedTypes StringRef +PYMODS += Value User Constant PYMODS += LLVMContext AssemblyAnnotationWriter Module + all: _api.so _capsule.so _api.so _capsule.so: api.cpp capsule.cpp diff --git a/newbinding/src/Constant.py b/newbinding/src/Constant.py new file mode 100644 index 0000000..24045bb --- /dev/null +++ b/newbinding/src/Constant.py @@ -0,0 +1,5 @@ +from binding import * +from namespace import llvm +from User import User + +Constant = User.Subclass() diff --git a/newbinding/src/User.py b/newbinding/src/User.py new file mode 100644 index 0000000..8753983 --- /dev/null +++ b/newbinding/src/User.py @@ -0,0 +1,5 @@ +from binding import * +from namespace import llvm +from Value import Value + +User = Value.Subclass() diff --git a/newbinding/src/Value.py b/newbinding/src/Value.py new file mode 100644 index 0000000..ec7aa9a --- /dev/null +++ b/newbinding/src/Value.py @@ -0,0 +1,8 @@ +from binding import * +from namespace import llvm +from raw_ostream import raw_ostream +from AssemblyAnnotationWriter import AssemblyAnnotationWriter + +Value = llvm.Class() +print_ = Value.method(Void, raw_ostream.Ref, AssemblyAnnotationWriter.Pointer) +print_.realname = 'print'