Changeset View
Changeset View
Standalone View
Standalone View
mlir/lib/Target/Cpp/TranslateToCpp.cpp
Show First 20 Lines • Show All 816 Lines • ▼ Show 20 Lines | for (NamedAttribute attr : op.getAttrs()) { | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
// Emit attributes. | // Emit attributes. | ||||
auto emitNamedAttribute = [&](NamedAttribute attr) -> LogicalResult { | auto emitNamedAttribute = [&](NamedAttribute attr) -> LogicalResult { | ||||
if (llvm::is_contained(exclude, attr.first.strref())) | if (llvm::is_contained(exclude, attr.first.strref())) | ||||
return success(); | return success(); | ||||
os << "/* " << attr.first << " */"; | os << "/* " << attr.first.getValue() << " */"; | ||||
if (failed(emitAttribute(op.getLoc(), attr.second))) | if (failed(emitAttribute(op.getLoc(), attr.second))) | ||||
return failure(); | return failure(); | ||||
return success(); | return success(); | ||||
}; | }; | ||||
return interleaveCommaWithError(op.getAttrs(), os, emitNamedAttribute); | return interleaveCommaWithError(op.getAttrs(), os, emitNamedAttribute); | ||||
} | } | ||||
LogicalResult CppEmitter::emitVariableAssignment(OpResult result) { | LogicalResult CppEmitter::emitVariableAssignment(OpResult result) { | ||||
▲ Show 20 Lines • Show All 169 Lines • Show Last 20 Lines |