[7/8] Correctly fix labels for armasm even if the lines start with leading space

Message ID 1508013322-19428-7-git-send-email-martin@martin.st
State Committed
Headers show

Commit Message

Martin Storsjö Oct. 14, 2017, 8:35 p.m.
---
 gas-preprocessor.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Diego Biurrun Oct. 16, 2017, 5:36 a.m. | #1
On Sat, Oct 14, 2017 at 11:35:21PM +0300, Martin Storsjo wrote:
> ---
>  gas-preprocessor.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

OK

Diego

Patch

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 63b0ab3..9bcdbac 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -853,7 +853,7 @@  sub handle_serialized_line {
             $last_temp_labels{$num} = $name;
         }
 
-        if ($line =~ s/^(\w+):/$1/) {
+        if ($line =~ s/^\s*(\w+):/$1/) {
             # Skip labels that have already been declared with a PROC,
             # labels must not be declared multiple times.
             return if (defined $labels_seen{$1});