Mercurial > projects > ldc
comparison gen/irstate.h @ 632:df196c8dea26
Updated to latest LLVM trunk, function notes have been removed and merged with parameter attributes, which have been renamed to just attributes. Nothing seems to have broke!
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 01 Oct 2008 23:17:14 +0200 |
parents | 017ca8645a1f |
children | eef8ac26c66c |
comparison
equal
deleted
inserted
replaced
629:607b6b5819a7 | 632:df196c8dea26 |
---|---|
86 // llvm::CallInst and llvm::InvokeInst don't share a common base | 86 // llvm::CallInst and llvm::InvokeInst don't share a common base |
87 // but share common functionality. to avoid duplicating code for | 87 // but share common functionality. to avoid duplicating code for |
88 // adjusting these common properties these structs are made | 88 // adjusting these common properties these structs are made |
89 struct CallOrInvoke | 89 struct CallOrInvoke |
90 { | 90 { |
91 virtual void setParamAttrs(const llvm::PAListPtr& Attrs) = 0; | 91 virtual void setAttributes(const llvm::AttrListPtr& Attrs) = 0; |
92 virtual void setCallingConv(unsigned CC) = 0; | 92 virtual void setCallingConv(unsigned CC) = 0; |
93 virtual llvm::Instruction* get() = 0; | 93 virtual llvm::Instruction* get() = 0; |
94 }; | 94 }; |
95 | 95 |
96 struct CallOrInvoke_Call : public CallOrInvoke | 96 struct CallOrInvoke_Call : public CallOrInvoke |
97 { | 97 { |
98 llvm::CallInst* inst; | 98 llvm::CallInst* inst; |
99 CallOrInvoke_Call(llvm::CallInst* call) : inst(call) {} | 99 CallOrInvoke_Call(llvm::CallInst* call) : inst(call) {} |
100 | 100 |
101 virtual void setParamAttrs(const llvm::PAListPtr& Attrs) | 101 virtual void setAttributes(const llvm::AttrListPtr& Attrs) |
102 { inst->setParamAttrs(Attrs); } | 102 { inst->setAttributes(Attrs); } |
103 virtual void setCallingConv(unsigned CC) | 103 virtual void setCallingConv(unsigned CC) |
104 { inst->setCallingConv(CC); } | 104 { inst->setCallingConv(CC); } |
105 virtual llvm::Instruction* get() | 105 virtual llvm::Instruction* get() |
106 { return inst; } | 106 { return inst; } |
107 }; | 107 }; |
109 struct CallOrInvoke_Invoke : public CallOrInvoke | 109 struct CallOrInvoke_Invoke : public CallOrInvoke |
110 { | 110 { |
111 llvm::InvokeInst* inst; | 111 llvm::InvokeInst* inst; |
112 CallOrInvoke_Invoke(llvm::InvokeInst* invoke) : inst(invoke) {} | 112 CallOrInvoke_Invoke(llvm::InvokeInst* invoke) : inst(invoke) {} |
113 | 113 |
114 virtual void setParamAttrs(const llvm::PAListPtr& Attrs) | 114 virtual void setAttributes(const llvm::AttrListPtr& Attrs) |
115 { inst->setParamAttrs(Attrs); } | 115 { inst->setAttributes(Attrs); } |
116 virtual void setCallingConv(unsigned CC) | 116 virtual void setCallingConv(unsigned CC) |
117 { inst->setCallingConv(CC); } | 117 { inst->setCallingConv(CC); } |
118 virtual llvm::Instruction* get() | 118 virtual llvm::Instruction* get() |
119 { return inst; } | 119 { return inst; } |
120 }; | 120 }; |