mlir-hlo/tools/mlir-tblgen-builder/Builder/OpImpl.h

27 lines
533 B
C
Raw Normal View History

2021-08-04 20:24:07 +08:00
#ifndef BUILDER_OPIMPL_
#define BUILDER_OPIMPL_
#include "Builder.h"
#include "llvm/Support/Casting.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/Types.h"
#include "mlir/IR/Value.h"
namespace builder {
class Op::Impl {
public:
Impl() = default;
2021-08-13 15:05:10 +08:00
void SetOperation(mlir::Operation *Op) { op_ = Op; }
mlir::Value GetResult() { return op_->getResult(0); }
2021-08-04 20:24:07 +08:00
private:
2021-08-13 15:05:10 +08:00
mlir::Operation *op_;
2021-08-04 20:24:07 +08:00
};
} // namespace builder
#endif