Twine: Stores kinds as uchar instead of bitfield to be friendlier to the

optimizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89278 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2009-11-19 00:04:43 +00:00
parent fbb6b67df0
commit b80077aae9

View File

@ -133,9 +133,9 @@ namespace llvm {
/// Null or Empty kinds. /// Null or Empty kinds.
const void *RHS; const void *RHS;
/// LHSKind - The NodeKind of the left hand side, \see getLHSKind(). /// LHSKind - The NodeKind of the left hand side, \see getLHSKind().
NodeKind LHSKind : 8; unsigned char LHSKind;
/// RHSKind - The NodeKind of the left hand side, \see getLHSKind(). /// RHSKind - The NodeKind of the left hand side, \see getLHSKind().
NodeKind RHSKind : 8; unsigned char RHSKind;
private: private:
/// Construct a nullary twine; the kind must be NullKind or EmptyKind. /// Construct a nullary twine; the kind must be NullKind or EmptyKind.
@ -209,10 +209,10 @@ namespace llvm {
} }
/// getLHSKind - Get the NodeKind of the left-hand side. /// getLHSKind - Get the NodeKind of the left-hand side.
NodeKind getLHSKind() const { return LHSKind; } NodeKind getLHSKind() const { return (NodeKind) LHSKind; }
/// getRHSKind - Get the NodeKind of the left-hand side. /// getRHSKind - Get the NodeKind of the left-hand side.
NodeKind getRHSKind() const { return RHSKind; } NodeKind getRHSKind() const { return (NodeKind) RHSKind; }
/// printOneChild - Print one child from a twine. /// printOneChild - Print one child from a twine.
void printOneChild(raw_ostream &OS, const void *Ptr, NodeKind Kind) const; void printOneChild(raw_ostream &OS, const void *Ptr, NodeKind Kind) const;