Support optional LLVM-level debug info

This commit is contained in:
Mark Florisson 2013-01-21 19:30:46 -06:00
commit 3fba8e4adf
2 changed files with 30 additions and 21 deletions

View file

@ -58,6 +58,7 @@ class TestDebugInfo(unittest.TestCase):
# compile_unit.add_metadata("subprograms", subprograms)
compile_unit.define(mod)
subprogram.define(mod)
value = square.args[0]
result = bldr.fmul(value, value)
@ -66,11 +67,15 @@ class TestDebugInfo(unittest.TestCase):
print mod
modstr = str(mod)
# Test compile unit
self.assertIn("my_cool_compiler", modstr)
self.assertIn("test_debug_info.py", modstr)
self.assertIn(os.path.expanduser("~/"), modstr)
self.assertIn(os.path.expanduser("~"), modstr)
self.assertIn("my_cool_compiler", modstr)
# Test subprogram
self.assertIn("some_function", modstr)
if __name__ == '__main__':
# TestDebugInfo("test_dwarf_constants").debug()