Skip to content

Commit 831eb66

Browse files
committed
emitc.include: don't require the parent to be a ModuleOp
`#include` make sense everywhere, and in particular we need to allow them inside a `emitc.tu`. But sometimes we might even want to have an `#include` in a function body.
1 parent cab7e24 commit 831eb66

File tree

1 file changed

+1
-1
lines changed
  • mlir/include/mlir/Dialect/EmitC/IR

1 file changed

+1
-1
lines changed

mlir/include/mlir/Dialect/EmitC/IR/EmitC.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ def EmitC_ReturnOp : EmitC_Op<"return", [Pure, HasParent<"FuncOp">,
774774
}
775775

776776
def EmitC_IncludeOp
777-
: EmitC_Op<"include", [HasParent<"ModuleOp">]> {
777+
: EmitC_Op<"include", []> {
778778
let summary = "Include operation";
779779
let description = [{
780780
The `emitc.include` operation allows to define a source file inclusion via the

0 commit comments

Comments
 (0)