Skip to content

Commit

Permalink
emitc.include: don't require the parent to be a ModuleOp
Browse files Browse the repository at this point in the history
`#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.
  • Loading branch information
mgehre-amd committed Nov 6, 2024
1 parent cab7e24 commit 831eb66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ def EmitC_ReturnOp : EmitC_Op<"return", [Pure, HasParent<"FuncOp">,
}

def EmitC_IncludeOp
: EmitC_Op<"include", [HasParent<"ModuleOp">]> {
: EmitC_Op<"include", []> {
let summary = "Include operation";
let description = [{
The `emitc.include` operation allows to define a source file inclusion via the
Expand Down

0 comments on commit 831eb66

Please sign in to comment.