add method to retrieve host cpu name

add stub method to enginebuilder to setMCPU and setMAttrs -- these are not implemented in llvm3.1
This commit is contained in:
Siu Kwan Lam 2012-08-18 17:32:40 -07:00
commit 1ed2049395
5 changed files with 65 additions and 3 deletions

View file

@ -1,5 +1,5 @@
from llvm.core import *
from llvm.ee import TargetMachine, EngineBuilder, print_registered_targets
from llvm.ee import *
import unittest
class TestTargetMachines(unittest.TestCase):
@ -17,6 +17,7 @@ class TestTargetMachines(unittest.TestCase):
self.assertTrue(tm.target_short_description)
self.assertTrue(tm.triple)
self.assertIn('foo', tm.emit_assembly(m).decode('utf-8'))
self.assertTrue(get_host_cpu_name())
def test_ptx(self):
if HAS_PTX: