summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AsmWriter.cpp
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2015-04-13 22:36:38 +0000
committerDaniel Berlin <dberlin@dberlin.org>2015-04-13 22:36:38 +0000
commitd8d6046e692bb2843f076b1f96dbf2543bbb03e3 (patch)
treec9dd00f1b793298d4b82f18296f3995bdece75b0 /llvm/lib/IR/AsmWriter.cpp
parent271f4d1c1b74661dabdaecf0c196c9155138d223 (diff)
downloadbcm5719-llvm-d8d6046e692bb2843f076b1f96dbf2543bbb03e3.tar.gz
bcm5719-llvm-d8d6046e692bb2843f076b1f96dbf2543bbb03e3.zip
Allow printing functions with an optional annotationwriter
llvm-svn: 234807
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index f3ca13db5dd..fd09d47c745 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -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);
OpenPOWER on IntegriCloud