[llvm] r196607 - Integrated assembler incorrectly lexes ARM-style comments

Jim Grosbach grosbach at apple.com
Fri Dec 6 14:55:15 PST 2013


On Dec 6, 2013, at 2:52 PM, David Peixotto <dpeixott at codeaurora.org> wrote:

>> Just for consistency with I'd put the initialization in the body of the
>> constructor like the initializer for isAtStartOfLine. Good to commit with
>> that change. Thanks!
> 
> I had to put it in the initializer list because I made the class variable
> const. I wasn't sure about that decision. Is it better to keep it const and
> use the initializer list, or make it non-const (then I can initialize it in
> the body)?

I don’t have a really strong opinion, but a slight preference for dropping the ‘const.’ In theory this is something that could vary within an assembly translation unit. For example, Intel and ARM both have syntax variants that are switchable via an assembler directive. There’s no reason such a switch could not also change thing like the comment character.

-Jim



More information about the llvm-commits mailing list