forked from OSchip/llvm-project
[mlir][ods][nfc] fix gcc-5 build
This commit is contained in:
parent
435d44bf8a
commit
ecaad4a876
|
@ -556,9 +556,15 @@ class Class {
|
|||
public:
|
||||
virtual ~Class() = default;
|
||||
|
||||
/// Explicitly delete the copy constructor. This is to work around a gcc-5 bug
|
||||
/// with std::is_trivially_move_constructible.
|
||||
Class(const Class &) = delete;
|
||||
|
||||
/// Create a class with a name, and whether it should be declared as a `class`
|
||||
/// or `struct`.
|
||||
template <typename NameT>
|
||||
/// or `struct`. Also, prevent this from being mistaken as a move constructor
|
||||
/// candidate.
|
||||
template <typename NameT, typename = typename std::enable_if_t<
|
||||
!std::is_same<NameT, Class>::value>>
|
||||
Class(NameT &&name, bool isStruct = false)
|
||||
: className(stringify(std::forward<NameT>(name))), isStruct(isStruct) {}
|
||||
|
||||
|
|
|
@ -251,7 +251,7 @@ void DefGen::emitVerifier() {
|
|||
void DefGen::emitParserPrinter() {
|
||||
auto *mnemonic = defCls.addStaticMethod<Method::Constexpr>(
|
||||
"::llvm::StringLiteral", "getMnemonic");
|
||||
mnemonic->body().indent() << strfmt("return \"{0}\";", *def.getMnemonic());
|
||||
mnemonic->body().indent() << strfmt("return {\"{0}\"};", *def.getMnemonic());
|
||||
// Declare the parser and printer, if needed.
|
||||
if (!def.needsParserPrinter() && !def.hasGeneratedParser() &&
|
||||
!def.hasGeneratedPrinter())
|
||||
|
|
Loading…
Reference in New Issue