diff options
author | Pirama Arumuga Nainar <pirama@google.com> | 2019-08-08 15:37:06 -0700 |
---|---|---|
committer | Pirama Arumuga Nainar <pirama@google.com> | 2019-08-09 15:45:21 +0000 |
commit | d5ec2a1321106a4bc56cba197dfbc538c09b4ae9 (patch) | |
tree | 158310581c8343c5d8840b2b6febbb17bde01ad2 /tools/cpp-define-generator/make_header.py | |
parent | fa595885339140c3507f26d93cdc6b99081e23c5 (diff) |
Make the $/# in front of constants optional
Bug: http://b/117842681
Bug: https://github.com/android-ndk/ndk/issues/1036
After change https://reviews.llvm.org/D65550, Clang stopped emitting '#'
before constants in inline assembly. To accommodate this change, mark
the $/# before constants as optional in make_header.py
Test: Build with old and new compilers
Change-Id: Idb056c99a2bfc4d14e4e30d7dc1d0740ca4f9b60
Diffstat (limited to 'tools/cpp-define-generator/make_header.py')
-rwxr-xr-x | tools/cpp-define-generator/make_header.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/cpp-define-generator/make_header.py b/tools/cpp-define-generator/make_header.py index 1b13923b50..f3657b1db1 100755 --- a/tools/cpp-define-generator/make_header.py +++ b/tools/cpp-define-generator/make_header.py @@ -31,7 +31,7 @@ import sys def convert(input): """Find all defines in the compiler generated assembly and convert them to #define pragmas""" - asm_define_re = re.compile(r'">>(\w+) (?:\$|#)([-0-9]+) (?:\$|#)(0|1)<<"') + asm_define_re = re.compile(r'">>(\w+) (?:\$|#)?([-0-9]+) (?:\$|#)?(0|1)<<"') asm_defines = asm_define_re.findall(input) if not asm_defines: raise RuntimeError("Failed to find any asm defines in the input") |