Skip to content

Commit 8fda307

Browse files
Revert one of the "unrelated fixes".
That fix had removed the test in `parseTransformModuleFromFile` for an empty file name. However, the function is still used in cases where the file name may be empty, in which case we do not want a failure but want to return from the function.
1 parent 5c7302a commit 8fda307

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mlir/lib/Dialect/Transform/Transforms/TransformInterpreterUtils.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ LogicalResult transform::detail::expandPathsToMLIRFiles(
9090
LogicalResult transform::detail::parseTransformModuleFromFile(
9191
MLIRContext *context, llvm::StringRef transformFileName,
9292
OwningOpRef<ModuleOp> &transformModule) {
93+
if (transformFileName.empty()) {
94+
LLVM_DEBUG(
95+
DBGS() << "no transform file name specified, assuming the transform "
96+
"module is embedded in the IR next to the top-level\n");
97+
return success();
98+
}
9399
// Parse transformFileName content into a ModuleOp.
94100
std::string errorMessage;
95101
auto memoryBuffer = mlir::openInputFile(transformFileName, &errorMessage);

0 commit comments

Comments
 (0)