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

Roger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 16 02:48:18 PDT 2018


royger added a comment.

In https://reviews.llvm.org/D44531#1039804, @labath wrote:

> > llvm/tools/clang/lib/Basic/SourceManager.cpp:173:17: error: no viable conversion from 'const char [5]' to 'llvm::StringLiteral'
>
> Are you using gcc (~4.x) by any chance? Older versions of gcc seem to have issues with the StringLiteral constructor. One solution is to wrap the argument in extra {}, so something like `.StartsWith({"\x00\x00\xFE\xFF"}, "UTF-32 (BE)")`


No, I'm using clang 6.0:

FreeBSD clang version 6.0.0 (branches/release_60 325330) (based on LLVM 6.0.0)

TBH I'm not sure why I get this error, IIRC this is a pre-release clang 6.0, so maybe I'm missing some patches?


Repository:
  rL LLVM

https://reviews.llvm.org/D44531





More information about the llvm-commits mailing list