Commit graph

313 commits

Author SHA1 Message Date
Siu Kwan Lam
d781e83bd1 can now clone modules 2012-10-19 16:18:24 -05:00
Siu Kwan Lam
e0d1b94053 Add NamedMetaData 2012-10-16 16:35:20 -05:00
Siu Kwan Lam
d1fefe5a69 Fix doc about Python3.2 testing 2012-10-10 10:58:02 -05:00
Thomas Kluyver
87ffb437d8 Fix a couple of tests for Python 3 2012-10-10 10:49:48 -05:00
Thomas Kluyver
aba3e208d2 Improve bytes/unicode distinction for reading modules from bitcode & assembly 2012-10-10 10:49:48 -05:00
Thomas Kluyver
1c15a9784b Fix minor problems under Python 3 from running the tests 2012-10-10 10:49:48 -05:00
Siu Kwan Lam
bba30621f1 Allow to_native_object & to_native_assembly to receive an optional fileobj to write to. 2012-10-10 10:47:56 -05:00
Siu Kwan Lam
e42dfd9abb Improve PTX support discovery and make it optional. 2012-10-04 12:59:48 -05:00
Travis E. Oliphant
cdd26cde58 New version number and update README 2012-10-03 21:42:11 -05:00
Mark Wiebe
3d5468a9e2 Changes which allow the tests to run on windows in ipython qtconsole 0.8.3 2012-09-29 14:10:30 +09:00
Mark Wiebe
4d7d665a82 Template overload of <size_t> was incorrect
size_t can be 32-bit or 64-bit, was hardcoded to 32-bit
2012-09-28 17:53:54 +09:00
Mark Wiebe
2af04094a2 Rename nonconformant _TRY and _CATCH_ALL macros
Was conflicting with MSVC headers, for reference why this was
incorrect, see

http://stackoverflow.com/questions/228783/what-are-the-rules-about-using-an-underscore-in-a-c-identifier

Reserved in the global namespaces:
    identifiers beginning with an underscore
2012-09-28 17:49:23 +09:00
Siu Kwan Lam
323d432847 Implements Jun Koi's suggestion to improve consistency of the api:
* allow to_bitcode to return a string if no fileobj is defined.
* also modify from_bitcode and from_assembly to accept a string.
2012-09-26 10:19:35 -05:00
Siu Kwan Lam
51b22981ff Jun Koi's patch that fixes bad docstring for TargetMachine.emit_object. 2012-09-26 10:19:35 -05:00
Ilan Schnell
984bfece2d add native asm test 2012-09-22 22:18:39 -05:00
Ilan Schnell
7b0f3cc0c7 move engine builder test 2012-09-22 20:59:03 -05:00
Ilan Schnell
b97dbba105 add target machine test class 2012-09-22 20:52:20 -05:00
Ilan Schnell
bdf9a04e37 add opaque tests 2012-09-22 20:44:01 -05:00
Ilan Schnell
abaeee678f add volatile test 2012-09-22 20:39:00 -05:00
Ilan Schnell
81d6da3ae5 add constant expression test 2012-09-22 20:34:51 -05:00
Siu Kwan Lam
9a51ead50e Merge pull request #24 from dand-oss/master
Change static string in header file to extern
2012-09-21 19:42:22 -07:00
dand-oss
51611517de Change static string in header file to extern
- static will unnecessarily create and intialize a string in the data segment of each compiled cpp that includes it
2012-09-21 21:16:58 -05:00
Siu Kwan Lam
5debe65fe1 all llvmpy PyCapsule objects have a name.
pycap_get should throw when PyCapsule_GetPointer returns NULL.
2012-09-21 14:31:54 -07:00
Siu Kwan Lam
d642bfdfe6 Merge pull request #23 from dand-oss/master
pycap_new() template replaces a bunch of macro code
2012-09-21 13:46:32 -07:00
dand-oss
0ee70e1a92 pycap_new() template replaces a bunch of macro code 2012-09-21 09:22:03 -05:00
Siu Kwan Lam
0ee5e2e845 Raise TypeError when a function is called with the wrong argument.
Otherwise, llvm will give assertion error which is hard to trackdown.
2012-09-20 15:15:26 -07:00
Siu Kwan Lam
e7ad6c7439 Remove the need to build temporary std::vector. 2012-09-19 14:20:19 -07:00
Siu Kwan Lam
b748d34f48 a simply exercise for tbaa tree building. 2012-09-19 12:31:51 -07:00
Siu Kwan Lam
9767ac4d47 Improve error-handling for PyCapsule_GetPointer and related functions. 2012-09-15 19:10:05 -07:00
Siu Kwan Lam
0079b1de07 Cleanup all memory allocations and their exception handling 2012-09-15 18:34:15 -07:00
Siu Kwan Lam
f17d4f7d62 Add try-catch to all exposed functions 2012-09-15 18:17:16 -07:00
Siu Kwan Lam
d77c3a61e1 Better error handling for PyCapsule_GetPointer 2012-09-14 19:28:21 -07:00
Siu Kwan Lam
56796cad61 Follow up on pull request 21. Since PyCapsule_GetPointer returns NULL on error, we should check if the list element is Py_None. 2012-09-14 18:42:49 -07:00
Siu Kwan Lam
f9efc23e2d Merge pull request #21 from laanwj/2012_09_metadata_none
Thanks!
2012-09-14 18:18:03 -07:00
Wladimir J. van der Laan
c94e852c0e MetaData operands can be None. Handle this. 2012-09-14 17:09:28 +02:00
Ilan Schnell
53d782bd39 update setup.py 2012-09-13 21:23:40 -05:00
Ilan Schnell
5df7c4d159 improve test to not use hardcoded test directory 2012-09-13 10:57:48 -05:00
Ilan Schnell
77d199e60d add atomic tests 2012-09-12 17:26:03 -05:00
Ilan Schnell
211f273000 add attribute test 2012-09-12 16:26:52 -05:00
Ilan Schnell
e6bfbca6e8 update readme 2012-09-12 15:55:36 -05:00
Ilan Schnell
8af02c5a7e add the assembly test 2012-09-12 15:50:29 -05:00
Ilan Schnell
b8dd256e11 add intrinsic tests to test module 2012-09-12 15:46:20 -05:00
Ilan Schnell
2b9ac16733 move issue 10 test case into common tests 2012-09-12 15:34:41 -05:00
Ilan Schnell
6d60c4a469 add inline test to common test suite 2012-09-12 15:18:12 -05:00
Ilan Schnell
28c659ec90 Merge pull request #20 from laanwj/2012_09_module_named_metadata
Add support for module named metadata
2012-09-12 12:27:55 -07:00
Wladimir J. van der Laan
e2d8079b93 Support MetaDataString, and correctly represent MetaData Values in _make_value 2012-09-12 21:23:54 +02:00
Wladimir J. van der Laan
7f69beb258 Access to MetaData operands
This is not available in the C API, so add functions to extra.cpp:

- `LLVMMetaDataGetOperand` wraps MDNode::getOperand
- `LLVMMetaDataGetNumOperands` wraps MDNode::getNumOperands
2012-09-12 20:59:59 +02:00
Wladimir J. van der Laan
6e6bd1ea71 Add support for module named metadata
This is mainly useful to get access to top-level debug information through 'llvm.dbg.cu'.

Wraps LLVM C-API functions `LLVMGetNamedMetadataNumOperands`, `LLVMGetNamedMetadataOperands` and `LLVMAddNamedMetadataOperand`.

Also add testcase.
2012-09-12 20:03:24 +02:00
Siu Kwan Lam
5ee6bba66b Fix invalid prototype after switches to size_t instead of unsigned int. 2012-09-10 17:22:20 -07:00
dand-oss
db00a6b8de C++ cleanup of old C conventions - prefer C++ casting to unsafe C style casts - use templates to encapsulate casting - prefer new to malloc - apply const when possible - decalare variables as near to use as possible 2012-09-10 16:52:50 -07:00