示例#1
0
    def emit_assembly(self, module):
        """
        Return the raw assembler of the module, as a string.

        llvm.initialize_native_asmprinter() must have been called first.
        """
        return _decode_string(self._emit_to_memory(module, use_object=False))
示例#2
0
 def name(self):
     return _decode_string(ffi.lib.LLVMPY_GetValueName(self))
示例#3
0
 def __str__(self):
     if self._ptr is None:
         return "<dead OutputString>"
     s = self._ptr.value
     assert s is not None
     return _decode_string(s)
示例#4
0
 def name(self):
     """
     The module's identifier.
     """
     return _decode_string(ffi.lib.LLVMPY_GetModuleName(self))
示例#5
0
 def description(self):
     s = ffi.lib.LLVMPY_GetTargetDescription(self)
     return _decode_string(s)
示例#6
0
 def name(self):
     s = ffi.lib.LLVMPY_GetTargetName(self)
     return _decode_string(s)
示例#7
0
 def source_file(self):
     """
     The module's original source file name
     """
     return _decode_string(ffi.lib.LLVMPY_GetModuleSourceFileName(self))