diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2009-05-15 03:03:14 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2009-05-15 03:03:14 +0000 |
commit | aa0b3df5a03304cf6fbc27d95a0d95717a3a61d0 (patch) | |
tree | 80fcf6175bd796080f0f88b6c07e986a3aa3a796 /utils/TableGen | |
parent | bc0d23afae781c45f92865c1c27bed0ce51fe545 (diff) | |
download | external_llvm-aa0b3df5a03304cf6fbc27d95a0d95717a3a61d0.zip external_llvm-aa0b3df5a03304cf6fbc27d95a0d95717a3a61d0.tar.gz external_llvm-aa0b3df5a03304cf6fbc27d95a0d95717a3a61d0.tar.bz2 |
Add extra parenthesis around || statements to pacify compiler.
Also fix up some 80col violations while I'm there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71833 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/Record.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h index 2153a54..4284cab 100644 --- a/utils/TableGen/Record.h +++ b/utils/TableGen/Record.h @@ -639,7 +639,8 @@ public: class StringInit : public TypedInit { std::string Value; public: - explicit StringInit(const std::string &V) : TypedInit(new StringRecTy), Value(V) {} + explicit StringInit(const std::string &V) + : TypedInit(new StringRecTy), Value(V) {} const std::string &getValue() const { return Value; } @@ -774,7 +775,8 @@ public: // Clone - Clone this operator, replacing arguments with the new list virtual OpInit *clone(std::vector<Init *> &Operands) { - assert(Operands.size() == 1 && "Wrong number of operands for unary operation"); + assert(Operands.size() == 1 && + "Wrong number of operands for unary operation"); return new UnOpInit(getOpcode(), *Operands.begin(), getType()); } @@ -811,13 +813,14 @@ public: // Clone - Clone this operator, replacing arguments with the new list virtual OpInit *clone(std::vector<Init *> &Operands) { - assert(Operands.size() == 2 && "Wrong number of operands for binary operation"); + assert(Operands.size() == 2 && + "Wrong number of operands for binary operation"); return new BinOpInit(getOpcode(), Operands[0], Operands[1], getType()); } int getNumOperands(void) const { return 2; } Init *getOperand(int i) { - assert(i == 0 || i == 1 && "Invalid operand id for binary operator"); + assert((i == 0 || i == 1) && "Invalid operand id for binary operator"); if (i == 0) { return getLHS(); } @@ -854,13 +857,16 @@ public: // Clone - Clone this operator, replacing arguments with the new list virtual OpInit *clone(std::vector<Init *> &Operands) { - assert(Operands.size() == 3 && "Wrong number of operands for ternary operation"); - return new TernOpInit(getOpcode(), Operands[0], Operands[1], Operands[2], getType()); + assert(Operands.size() == 3 && + "Wrong number of operands for ternary operation"); + return new TernOpInit(getOpcode(), Operands[0], Operands[1], Operands[2], + getType()); } int getNumOperands(void) const { return 3; } Init *getOperand(int i) { - assert(i == 0 || i == 1 || i == 2 && "Invalid operand id for ternary operator"); + assert((i == 0 || i == 1 || i == 2) && + "Invalid operand id for ternary operator"); if (i == 0) { return getLHS(); } |