diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-02 00:09:22 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-02 00:09:22 +0000 |
commit | cdcb388a589846e7e7ca8c88f77cf53933539074 (patch) | |
tree | 102b57bc1bec330760885d8ae7ea0774883523a6 /include/llvm/MC/MCInst.h | |
parent | 7b1dcdfce1b199f314df3de697c791fde38b175e (diff) | |
download | llvm-cdcb388a589846e7e7ca8c88f77cf53933539074.tar.gz llvm-cdcb388a589846e7e7ca8c88f77cf53933539074.tar.bz2 llvm-cdcb388a589846e7e7ca8c88f77cf53933539074.tar.xz |
Change MCOperand to use Create style instead of Make style for constructing
operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77837 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCInst.h')
-rw-r--r-- | include/llvm/MC/MCInst.h | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/include/llvm/MC/MCInst.h b/include/llvm/MC/MCInst.h index 8b638d4c74..36011b9b65 100644 --- a/include/llvm/MC/MCInst.h +++ b/include/llvm/MC/MCInst.h @@ -94,22 +94,30 @@ public: MCValueVal = Val; } - void MakeReg(unsigned Reg) { - Kind = kRegister; - RegVal = Reg; + static MCOperand CreateReg(unsigned Reg) { + MCOperand Op; + Op.Kind = kRegister; + Op.RegVal = Reg; + return Op; } - void MakeImm(int64_t Val) { - Kind = kImmediate; - ImmVal = Val; + static MCOperand CreateImm(int64_t Val) { + MCOperand Op; + Op.Kind = kImmediate; + Op.ImmVal = Val; + return Op; } - void MakeMBBLabel(unsigned Fn, unsigned MBB) { - Kind = kMBBLabel; - MBBLabel.FunctionNo = Fn; - MBBLabel.BlockNo = MBB; + static MCOperand CreateMBBLabel(unsigned Fn, unsigned MBB) { + MCOperand Op; + Op.Kind = kMBBLabel; + Op.MBBLabel.FunctionNo = Fn; + Op.MBBLabel.BlockNo = MBB; + return Op; } - void MakeMCValue(const MCValue &Val) { - Kind = kMCValue; - MCValueVal = Val; + static MCOperand CreateMCValue(const MCValue &Val) { + MCOperand Op; + Op.Kind = kMCValue; + Op.MCValueVal = Val; + return Op; } }; |