summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Pass/IRPrinting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Pass/IRPrinting.cpp')
-rw-r--r--mlir/lib/Pass/IRPrinting.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/mlir/lib/Pass/IRPrinting.cpp b/mlir/lib/Pass/IRPrinting.cpp
index 868d492e094..057f2655207 100644
--- a/mlir/lib/Pass/IRPrinting.cpp
+++ b/mlir/lib/Pass/IRPrinting.cpp
@@ -61,12 +61,12 @@ private:
static void printIR(const llvm::Any &ir, bool printModuleScope,
raw_ostream &out) {
// Check for printing at module scope.
- if (printModuleScope && llvm::any_isa<Function *>(ir)) {
- Function *function = llvm::any_cast<Function *>(ir);
+ if (printModuleScope && llvm::any_isa<Function>(ir)) {
+ Function function = llvm::any_cast<Function>(ir);
// Print the function name and a newline before the Module.
- out << " (function: " << function->getName() << ")\n";
- function->getModule()->print(out);
+ out << " (function: " << function.getName() << ")\n";
+ function.getModule()->print(out);
return;
}
@@ -74,8 +74,8 @@ static void printIR(const llvm::Any &ir, bool printModuleScope,
out << "\n";
// Print the given function.
- if (llvm::any_isa<Function *>(ir)) {
- llvm::any_cast<Function *>(ir)->print(out);
+ if (llvm::any_isa<Function>(ir)) {
+ llvm::any_cast<Function>(ir).print(out);
return;
}
OpenPOWER on IntegriCloud