summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-05-19 18:17:39 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-05-19 18:17:39 +0000
commitc5e0d4d146bed47b4e306b8f9fa0a2766d14a641 (patch)
treead7b2580b67bd1764285c10a094acd7794b129fd /llvm/lib/Support
parent17a75d61b95fdc99edc7058aa87fa87d35cdeca4 (diff)
downloadbcm5719-llvm-c5e0d4d146bed47b4e306b8f9fa0a2766d14a641.tar.gz
bcm5719-llvm-c5e0d4d146bed47b4e306b8f9fa0a2766d14a641.zip
MIR Serialization: print and parse LLVM IR using MIR format.
This commit is the initial commit for the MIR serialization project. It creates a new library under CodeGen called 'MIR'. This new library adds a new machine function pass that prints out the LLVM IR using the MIR format. This pass is then added as a last pass when a 'stop-after' option is used in llc. The new library adds the initial functionality for parsing of MIR files as well. This commit also extends the llc tool so that it can recognize and parse MIR input files. Reviewers: Duncan P. N. Exon Smith, Matthias Braun, Philip Reames Differential Revision: http://reviews.llvm.org/D9616 llvm-svn: 237708
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/YAMLTraits.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Support/YAMLTraits.cpp b/llvm/lib/Support/YAMLTraits.cpp
index 90f34f6e232..0d47f37edbd 100644
--- a/llvm/lib/Support/YAMLTraits.cpp
+++ b/llvm/lib/Support/YAMLTraits.cpp
@@ -97,6 +97,10 @@ bool Input::nextDocument() {
return ++DocIterator != Strm->end();
}
+const Node *Input::getCurrentNode() const {
+ return CurrentNode ? CurrentNode->_node : nullptr;
+}
+
bool Input::mapTag(StringRef Tag, bool Default) {
std::string foundTag = CurrentNode->_node->getVerbatimTag();
if (foundTag.empty()) {
OpenPOWER on IntegriCloud