From d5ec2a1321106a4bc56cba197dfbc538c09b4ae9 Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Thu, 8 Aug 2019 15:37:06 -0700 Subject: 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 --- tools/cpp-define-generator/make_header.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/cpp-define-generator/make_header.py') 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") -- cgit v1.2.3