diff options
| author | 2019-06-23 21:36:31 +0000 | |
|---|---|---|
| committer | 2019-06-23 21:36:31 +0000 | |
| commit | 23f101f37937a1bd4a29726cab2f76e0fb038b35 (patch) | |
| tree | f7da7d6b32c2e07114da399150bfa88d72187012 /gnu/llvm/tools/clang/utils/TestUtils/deep-stack.py | |
| parent | sort previous; ok deraadt (diff) | |
| download | wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.tar.xz wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.zip | |
Import LLVM 8.0.0 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/tools/clang/utils/TestUtils/deep-stack.py')
| -rwxr-xr-x | gnu/llvm/tools/clang/utils/TestUtils/deep-stack.py | 17 |
1 files changed, 9 insertions, 8 deletions
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 |
