[PATCH] D44531: MC: fix layering violation introduced in r325139

Roger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 15 11:45:08 PDT 2018


royger created this revision.
royger added reviewers: rafael, olista01, dblaikie, labath.
Herald added a subscriber: llvm-commits.

Move AsmToken from MC/MCParser/MCAsmLexer.h into MC/MCAsmMacro.h in
order to avoid MCAsmMacro definition depending on MCParser.

Note that I haven't been able to even fully build test this due to the
following issue:

llvm/tools/clang/lib/Basic/SourceManager.cpp:173:17: error: no viable conversion from 'const char [5]' to 'llvm::StringLiteral'

  .StartsWith("\x00\x00\xFE\xFF", "UTF-32 (BE)")
              ^~~~~~~~~~~~~~~~~~

llvm/include/llvm/ADT/StringRef.h:857:9: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const char [5]' to 'const llvm::StringLiteral &' for 1st argument

  class StringLiteral : public StringRef {
        ^

This is not related to my change.


Repository:
  rL LLVM

https://reviews.llvm.org/D44531

Files:
  include/llvm/MC/MCAsmMacro.h
  include/llvm/MC/MCParser/MCAsmLexer.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44531.138593.patch
Type: text/x-patch
Size: 8237 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180315/dc0287ae/attachment.bin>


More information about the llvm-commits mailing list