From 23f101f37937a1bd4a29726cab2f76e0fb038b35 Mon Sep 17 00:00:00 2001 From: patrick Date: Sun, 23 Jun 2019 21:36:31 +0000 Subject: Import LLVM 8.0.0 release including clang, lld and lldb. --- gnu/llvm/tools/clang/utils/TestUtils/deep-stack.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'gnu/llvm/tools/clang/utils/TestUtils/deep-stack.py') diff --git a/gnu/llvm/tools/clang/utils/TestUtils/deep-stack.py b/gnu/llvm/tools/clang/utils/TestUtils/deep-stack.py index 1750a5fca03..10bf47acb1f 100755 --- a/gnu/llvm/tools/clang/utils/TestUtils/deep-stack.py +++ b/gnu/llvm/tools/clang/utils/TestUtils/deep-stack.py @@ -1,22 +1,23 @@ #!/usr/bin/env python +from __future__ import absolute_import, division, print_function def pcall(f, N): if N == 0: - print >>f, ' f(0)' + print(' f(0)', file=f) return - print >>f, ' f(' + print(' f(', file=f) pcall(f, N - 1) - print >>f, ' )' + print(' )', file=f) def main(): f = open('t.c','w') - print >>f, 'int f(int n) { return n; }' - print >>f, 'int t() {' - print >>f, ' return' + print('int f(int n) { return n; }', file=f) + print('int t() {', file=f) + print(' return', file=f) pcall(f, 10000) - print >>f, ' ;' - print >>f, '}' + print(' ;', file=f) + print('}', file=f) if __name__ == "__main__": import sys -- cgit v1.2.3-59-g8ed1b