================
@@ -1,5 +1,5 @@
 // REQUIRES: x86-registered-target
-// RUN: %clang_cc1 %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - 
| FileCheck %s
+// RUN: %clang_cc1 %s -triple i386-apple-darwin10 -fdollars-in-identifiers 
-fasm-blocks -emit-llvm -o - | FileCheck %s
----------------
zygoloid wrote:

Just musing... if we wanted this to work automatically, we could implement 
detection of `__asm` in the preprocessor, and enable dollars-in-identifiers 
when lexing inside an `__asm` block. Detection of `__asm` at that phase is also 
necessary to properly handle `;` comments, which right now [we incorrectly 
discard after preprocessing](https://godbolt.org/z/GjxGhY889). (I'm not sure if 
there are any other lexing differences for MS `__asm` that we don't properly 
handle, but there might be.) But it's probably not worth it for a feature that 
only works (in MSVC at least) when targeting 32-bit x86. :)

Perhaps a better idea would be to enable `-fdollars-in-identifiers` under 
`-fms-compatibility`, given that MSVC still enables support for dollars in 
identifiers even in its conforming mode. Though perhaps we can leave that 
option as a fallback for if someone actually complains.

https://github.com/llvm/llvm-project/pull/135407
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to