forked from OSchip/llvm-project
Wrap op (de)serialization methods in anonymous namespace
It's a known bug that older GCC is not happy with method specialization in the enclosing (global) namespace: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480 This CL wraps the generated specialization methods in the anonymous namespace to make sure the specialization is in the same namespace as the class. PiperOrigin-RevId: 258983181
This commit is contained in:
parent
c253c6eb2f
commit
1331c84fe3
|
@ -462,10 +462,12 @@ LogicalResult Deserializer::processInstruction(spirv::Opcode opcode,
|
|||
return dispatchToAutogenDeserialization(opcode, operands);
|
||||
}
|
||||
|
||||
namespace {
|
||||
// Pull in auto-generated Deserializer::dispatchToAutogenDeserialization() and
|
||||
// various processOpImpl specializations.
|
||||
#define GET_DESERIALIZATION_FNS
|
||||
#include "mlir/Dialect/SPIRV/SPIRVSerialization.inc"
|
||||
} // namespace
|
||||
|
||||
Optional<spirv::ModuleOp> spirv::deserialize(ArrayRef<uint32_t> binary,
|
||||
MLIRContext *context) {
|
||||
|
|
|
@ -409,10 +409,12 @@ LogicalResult Serializer::processOperation(Operation *op) {
|
|||
return dispatchToAutogenSerialization(op);
|
||||
}
|
||||
|
||||
namespace {
|
||||
// Pull in auto-generated Serializer::dispatchToAutogenSerialization() and
|
||||
// various processOpImpl specializations.
|
||||
#define GET_SERIALIZATION_FNS
|
||||
#include "mlir/Dialect/SPIRV/SPIRVSerialization.inc"
|
||||
} // namespace
|
||||
|
||||
LogicalResult spirv::serialize(spirv::ModuleOp module,
|
||||
SmallVectorImpl<uint32_t> &binary) {
|
||||
|
|
Loading…
Reference in New Issue