summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRParser
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-06-16 00:10:47 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-06-16 00:10:47 +0000
commit5b5f97537f8b5865141d0bd827a1c271e6a90b0a (patch)
tree1ff21f0bc5d8c9d3e9ae410c8581248ff1ff3f16 /llvm/lib/CodeGen/MIRParser
parent47972afd102f557553d7c6555240bd80982afdd1 (diff)
downloadbcm5719-llvm-5b5f97537f8b5865141d0bd827a1c271e6a90b0a.tar.gz
bcm5719-llvm-5b5f97537f8b5865141d0bd827a1c271e6a90b0a.zip
MIR Serialization: Print and parse simple machine function attributes.
This commit serializes the simple, scalar attributes from the 'MachineFunction' class. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D10449 llvm-svn: 239790
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser')
-rw-r--r--llvm/lib/CodeGen/MIRParser/MIRParser.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
index 689615b8b6e..acd3c1130a5 100644
--- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
@@ -190,6 +190,11 @@ bool MIRParserImpl::initializeMachineFunction(MachineFunction &MF) {
return error(Twine("no machine function information for function '") +
MF.getName() + "' in the MIR file");
// TODO: Recreate the machine function.
+ const yaml::MachineFunction &YamlMF = *It->getValue();
+ if (YamlMF.Alignment)
+ MF.setAlignment(YamlMF.Alignment);
+ MF.setExposesReturnsTwice(YamlMF.ExposesReturnsTwice);
+ MF.setHasInlineAsm(YamlMF.HasInlineAsm);
return false;
}
OpenPOWER on IntegriCloud