Allow printing functions with an optional annotationwriter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234807 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Berlin
2015-04-13 22:36:38 +00:00
parent 0d982b840e
commit 8bdb7dbe57
2 changed files with 11 additions and 0 deletions

View File

@@ -3059,6 +3059,13 @@ void AssemblyWriter::printUseLists(const Function *F) {
// External Interface declarations
//===----------------------------------------------------------------------===//
void Function::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const {
SlotTracker SlotTable(this->getParent());
formatted_raw_ostream OS(ROS);
AssemblyWriter W(OS, SlotTable, this->getParent(), AAW);
W.printFunction(this);
}
void Module::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const {
SlotTracker SlotTable(this);
formatted_raw_ostream OS(ROS);