mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[modules] "Specialize" a function by actually specializing a function template
rather than by adding an overload and hoping that it's declared before the code that calls it. (In a modules build, it isn't.) llvm-svn: 207133
This commit is contained in:
parent
807e5d8a9a
commit
a49b5ce5a2
@ -59,11 +59,6 @@ private:
|
|||||||
void getAnalysisUsage(AnalysisUsage&) const override;
|
void getAnalysisUsage(AnalysisUsage&) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Specialize WriteGraph, the standard implementation won't work.
|
|
||||||
raw_ostream &WriteGraph(raw_ostream &O, const EdgeBundles &G,
|
|
||||||
bool ShortNames = false,
|
|
||||||
const Twine &Title = "");
|
|
||||||
|
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -69,15 +69,11 @@ bool EdgeBundles::runOnMachineFunction(MachineFunction &mf) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// view - Visualize the annotated bipartite CFG with Graphviz.
|
|
||||||
void EdgeBundles::view() const {
|
|
||||||
ViewGraph(*this, "EdgeBundles");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Specialize WriteGraph, the standard implementation won't work.
|
/// Specialize WriteGraph, the standard implementation won't work.
|
||||||
raw_ostream &llvm::WriteGraph(raw_ostream &O, const EdgeBundles &G,
|
template<>
|
||||||
bool ShortNames,
|
raw_ostream &llvm::WriteGraph<>(raw_ostream &O, const EdgeBundles &G,
|
||||||
const Twine &Title) {
|
bool ShortNames,
|
||||||
|
const Twine &Title) {
|
||||||
const MachineFunction *MF = G.getMachineFunction();
|
const MachineFunction *MF = G.getMachineFunction();
|
||||||
|
|
||||||
O << "digraph {\n";
|
O << "digraph {\n";
|
||||||
@ -95,3 +91,8 @@ raw_ostream &llvm::WriteGraph(raw_ostream &O, const EdgeBundles &G,
|
|||||||
O << "}\n";
|
O << "}\n";
|
||||||
return O;
|
return O;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// view - Visualize the annotated bipartite CFG with Graphviz.
|
||||||
|
void EdgeBundles::view() const {
|
||||||
|
ViewGraph(*this, "EdgeBundles");
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user