mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Add new setCondition member
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6603 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d15cd2752f
commit
9dad6d7411
@ -78,11 +78,13 @@ public:
|
||||
inline bool isUnconditional() const { return Operands.size() == 1; }
|
||||
inline bool isConditional() const { return Operands.size() == 3; }
|
||||
|
||||
inline const Value *getCondition() const {
|
||||
return isUnconditional() ? 0 : Operands[2].get();
|
||||
inline Value *getCondition() const {
|
||||
return isUnconditional() ? 0 : (Value*)Operands[2].get();
|
||||
}
|
||||
Value *getCondition() {
|
||||
return isUnconditional() ? 0 : Operands[2].get();
|
||||
|
||||
void setCondition(Value *V) {
|
||||
assert(isConditional() && "Cannot set condition of unconditional branch!");
|
||||
setOperand(2, V);
|
||||
}
|
||||
|
||||
// setUnconditionalDest - Change the current branch to an unconditional branch
|
||||
|
Loading…
Reference in New Issue
Block a user