[2/8] Strip out lines starting with '#' even if they have leading spaces

Message ID 1508013322-19428-2-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:35 a.m. | #1
On Sat, Oct 14, 2017 at 11:35:16PM +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 6aae65d..2c9cd07 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -269,7 +269,7 @@  while (<INPUT>) {
     # the line indicates a comment for all supported archs (aarch64, arm, ppc
     # and x86). Also strips line number comments but since they are off anyway
     # it is no loss.
-    s/^#.*$//;
+    s/^\s*#.*$//;
     # remove all comments (to avoid interfering with evaluating directives)
     s/(?<!\\)$inputcomm.*//x;
     # Strip out windows linefeeds