-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
212 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "Target.h" | ||
|
||
#include <llvm-c/Target.h> | ||
#include <nanobind/nanobind.h> | ||
|
||
namespace nb = nanobind; | ||
using namespace nb::literals; | ||
|
||
void populateTarget(nb::module_ &m) { | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef LLVMPYM_TARGET_H | ||
#define LLVMPYM_TARGET_H | ||
|
||
#include <nanobind/nanobind.h> | ||
|
||
void populateTarget(nanobind::module_ &m); | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "PyTargetData.h" | ||
|
||
PyTargetData::PyTargetData(LLVMTargetDataRef data) | ||
: obj(get_shared_obj(data)) {} | ||
|
||
LLVMTargetDataRef PyTargetData::get() const { | ||
return obj.get(); | ||
} | ||
|
||
SHARED_POINTER_IMPL(PyTargetData, LLVMTargetDataRef, LLVMOpaqueTargetData, | ||
LLVMDisposeTargetData) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef LLVMPYM_TYPES_PRIV_PYTARGETDATA_H | ||
#define LLVMPYM_TYPES_PRIV_PYTARGETDATA_H | ||
|
||
#include <llvm-c/Target.h> | ||
#include <memory> | ||
#include <unordered_map> | ||
#include <mutex> | ||
#include "PyLLVMObject.h" | ||
#include "utils.h" | ||
|
||
class PyTargetData : public PyLLVMObject<PyTargetData, LLVMTargetDataRef> { | ||
public: | ||
explicit PyTargetData(LLVMTargetDataRef data); | ||
LLVMTargetDataRef get() const; | ||
|
||
private: | ||
SHARED_POINTER_DEF(LLVMTargetDataRef, LLVMOpaqueTargetData); | ||
}; | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "PyTargetMachineOptions.h" | ||
|
||
PyTargetMachineOptions::PyTargetMachineOptions(LLVMTargetMachineOptionsRef obj) | ||
: obj(get_shared_obj(obj)) {} | ||
|
||
LLVMTargetMachineOptionsRef PyTargetMachineOptions::get() const { | ||
return obj.get(); | ||
} | ||
|
||
|
||
SHARED_POINTER_IMPL(PyTargetMachineOptions, LLVMTargetMachineOptionsRef, | ||
LLVMOpaqueTargetMachineOptions, LLVMDisposeTargetMachineOptions) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef LLVMPYM_TYPES_PRIV_PYTARGETMACHINEOPTIONS_H | ||
#define LLVMPYM_TYPES_PRIV_PYTARGETMACHINEOPTIONS_H | ||
|
||
#include <llvm-c/TargetMachine.h> | ||
#include <memory> | ||
#include <unordered_map> | ||
#include <mutex> | ||
#include "PyLLVMObject.h" | ||
#include "utils.h" | ||
|
||
class PyTargetMachineOptions : public PyLLVMObject<PyTargetMachineOptions, LLVMTargetMachineOptionsRef> { | ||
public: | ||
explicit PyTargetMachineOptions(LLVMTargetMachineOptionsRef machine); | ||
LLVMTargetMachineOptionsRef get() const; | ||
|
||
private: | ||
SHARED_POINTER_DEF(LLVMTargetMachineOptionsRef, LLVMOpaqueTargetMachineOptions); | ||
}; | ||
|
||
|
||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .llvmpym_ext.target import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters