diff options
author | Alex Lorenz <arphaman@gmail.com> | 2015-08-18 22:26:26 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2015-08-18 22:26:26 +0000 |
commit | a314d81328bb246646836f8c778a01b3ec4ddb87 (patch) | |
tree | 0f8d4f0ac7bc15ba915b8dc945098f03eade0c4e /llvm/lib/CodeGen/MIRParser/MIParser.cpp | |
parent | 913f776ff9b1ca1ee8875a9dba7f6e633932b4da (diff) | |
download | bcm5719-llvm-a314d81328bb246646836f8c778a01b3ec4ddb87.tar.gz bcm5719-llvm-a314d81328bb246646836f8c778a01b3ec4ddb87.zip |
MIR Serialization: Serialize the frame information's stack protector index.
llvm-svn: 245372
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MIParser.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MIRParser/MIParser.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIParser.cpp b/llvm/lib/CodeGen/MIRParser/MIParser.cpp index e040672a465..557b72596f8 100644 --- a/llvm/lib/CodeGen/MIRParser/MIParser.cpp +++ b/llvm/lib/CodeGen/MIRParser/MIParser.cpp @@ -97,6 +97,7 @@ public: bool parseStandaloneMBB(MachineBasicBlock *&MBB); bool parseStandaloneNamedRegister(unsigned &Reg); bool parseStandaloneVirtualRegister(unsigned &Reg); + bool parseStandaloneStackObject(int &FI); bool parseBasicBlockDefinition(DenseMap<unsigned, MachineBasicBlock *> &MBBSlots); @@ -655,6 +656,17 @@ bool MIParser::parseStandaloneVirtualRegister(unsigned &Reg) { return false; } +bool MIParser::parseStandaloneStackObject(int &FI) { + lex(); + if (Token.isNot(MIToken::StackObject)) + return error("expected a stack object"); + if (parseStackFrameIndex(FI)) + return true; + if (Token.isNot(MIToken::Eof)) + return error("expected end of string after the stack object reference"); + return false; +} + static const char *printImplicitRegisterFlag(const MachineOperand &MO) { assert(MO.isImplicit()); return MO.isDef() ? "implicit-def" : "implicit"; @@ -1794,3 +1806,12 @@ bool llvm::parseVirtualRegisterReference(unsigned &Reg, SourceMgr &SM, return MIParser(SM, MF, Error, Src, PFS, IRSlots) .parseStandaloneVirtualRegister(Reg); } + +bool llvm::parseStackObjectReference(int &FI, SourceMgr &SM, + MachineFunction &MF, StringRef Src, + const PerFunctionMIParsingState &PFS, + const SlotMapping &IRSlots, + SMDiagnostic &Error) { + return MIParser(SM, MF, Error, Src, PFS, IRSlots) + .parseStandaloneStackObject(FI); +} |