From fa3aec8353198e11c620f1ebb3468d7873b87941 Mon Sep 17 00:00:00 2001 From: anthony cantor Date: Fri, 23 Aug 2013 01:48:12 -0600 Subject: [PATCH] added some bindings to TargetMachine methods these methods return pointers to MC objects relevant to the arch the TargetMachine represents. --- llvmpy/src/Target/TargetMachine.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/llvmpy/src/Target/TargetMachine.py b/llvmpy/src/Target/TargetMachine.py index 764f8d0..492d603 100644 --- a/llvmpy/src/Target/TargetMachine.py +++ b/llvmpy/src/Target/TargetMachine.py @@ -9,7 +9,10 @@ from src.Support.CodeGen import CodeModel, TLSModel, CodeGenOpt, Reloc from src.GlobalValue import GlobalValue from src.DataLayout import DataLayout if LLVM_VERSION >= (3, 4): - from src.MC import MCAsmInfo, TargetInstrInfo, TargetSubtargetInfo + from src.MC import MCAsmInfo, \ + TargetInstrInfo, \ + TargetSubtargetInfo, \ + TargetRegisterInfo if LLVM_VERSION < (3, 3): from src.TargetTransformInfo import (ScalarTargetTransformInfo, @@ -58,9 +61,11 @@ class TargetMachine: ).require_only(3) if LLVM_VERSION >= (3, 4): - getSubtargetImpl = Method(const(ptr(TargetSubtargetInfo))) + getSubtargetImpl = Method(const(ownedptr(TargetSubtargetInfo))) - getMCAsmInfo = Method(const(ptr(MCAsmInfo))) + getMCAsmInfo = Method(const(ownedptr(MCAsmInfo))) - getInstrInfo = Method(const(ptr(TargetInstrInfo))) + getInstrInfo = Method(const(ownedptr(TargetInstrInfo))) + + getRegisterInfo = Method(const(ownedptr(TargetRegisterInfo)))