MC: AsmLexer: handle multi-character CommentStrings correctly
authorSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 14 Aug 2014 02:51:43 +0000 (02:51 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 14 Aug 2014 02:51:43 +0000 (02:51 +0000)
commit0086358325e2dfea485fb6bd4bd2ba1897899d56
tree5dc1de30742f15df5834a55ffb887675361ba1bc
parente8d6e379383b16bdc25601ea7ee10b73315dd29e
MC: AsmLexer: handle multi-character CommentStrings correctly

As X86MCAsmInfoDarwin uses '##' as CommentString although a single '#' starts a
comment a workaround for this special case is added.

Fixes divisions in constant expressions for the AArch64 assembler and other
targets which use '//' as CommentString.

Patch by Janne Grunau!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215615 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCParser/AsmLexer.h
lib/MC/MCParser/AsmLexer.cpp
test/MC/AArch64/single-slash.s [new file with mode: 0644]
test/MC/AsmParser/comments-x86-darwin.s [new file with mode: 0644]