diff options
| author | Chris Lattner <clattner@google.com> | 2019-03-21 11:39:22 -0700 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 17:29:58 -0700 |
| commit | 88e9f418f5ec04efbe7d470712991b34c2a9869c (patch) | |
| tree | 152ea70b0b7a3d3dc98129a2223d645162b1f202 /mlir/lib/Transforms/ViewFunctionGraph.cpp | |
| parent | f0b38058b14c5212f1fda628fac17df5c2647c2d (diff) | |
| download | bcm5719-llvm-88e9f418f5ec04efbe7d470712991b34c2a9869c.tar.gz bcm5719-llvm-88e9f418f5ec04efbe7d470712991b34c2a9869c.zip | |
Continue pushing const out of the core IR types - in this case, remove const
from Function.
PiperOrigin-RevId: 239638635
Diffstat (limited to 'mlir/lib/Transforms/ViewFunctionGraph.cpp')
| -rw-r--r-- | mlir/lib/Transforms/ViewFunctionGraph.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/mlir/lib/Transforms/ViewFunctionGraph.cpp b/mlir/lib/Transforms/ViewFunctionGraph.cpp index d77e96a99d7..f4e8e44cfdc 100644 --- a/mlir/lib/Transforms/ViewFunctionGraph.cpp +++ b/mlir/lib/Transforms/ViewFunctionGraph.cpp @@ -25,15 +25,14 @@ namespace llvm { // Specialize DOTGraphTraits to produce more readable output. template <> -struct llvm::DOTGraphTraits<const Function *> : public DefaultDOTGraphTraits { +struct llvm::DOTGraphTraits<Function *> : public DefaultDOTGraphTraits { using DefaultDOTGraphTraits::DefaultDOTGraphTraits; - static std::string getNodeLabel(const Block *Block, const Function *); + static std::string getNodeLabel(const Block *Block, Function *); }; -std::string -llvm::DOTGraphTraits<const Function *>::getNodeLabel(const Block *Block, - const Function *) { +std::string llvm::DOTGraphTraits<Function *>::getNodeLabel(const Block *Block, + Function *) { // Reuse the print output for the node labels. std::string outStreamStr; raw_string_ostream os(outStreamStr); @@ -56,19 +55,18 @@ llvm::DOTGraphTraits<const Function *>::getNodeLabel(const Block *Block, } // end namespace llvm -void mlir::viewGraph(const Function &function, const llvm::Twine &name, +void mlir::viewGraph(Function &function, const llvm::Twine &name, bool shortNames, const llvm::Twine &title, llvm::GraphProgram::Name program) { llvm::ViewGraph(&function, name, shortNames, title, program); } -llvm::raw_ostream &mlir::writeGraph(llvm::raw_ostream &os, - const Function *function, bool shortNames, - const llvm::Twine &title) { +llvm::raw_ostream &mlir::writeGraph(llvm::raw_ostream &os, Function *function, + bool shortNames, const llvm::Twine &title) { return llvm::WriteGraph(os, function, shortNames, title); } -void mlir::Function::viewGraph() const { +void mlir::Function::viewGraph() { ::mlir::viewGraph(*this, llvm::Twine("cfgfunc ") + getName().str()); } |

