[llvm-commits] [llvm] r89278 - /llvm/trunk/include/llvm/ADT/Twine.h
Daniel Dunbar
daniel at zuster.org
Wed Nov 18 16:04:44 PST 2009
Author: ddunbar
Date: Wed Nov 18 18:04:43 2009
New Revision: 89278
URL: http://llvm.org/viewvc/llvm-project?rev=89278&view=rev
Log:
Twine: Stores kinds as uchar instead of bitfield to be friendlier to the
optimizer.
Modified:
llvm/trunk/include/llvm/ADT/Twine.h
Modified: llvm/trunk/include/llvm/ADT/Twine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Twine.h?rev=89278&r1=89277&r2=89278&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Twine.h (original)
+++ llvm/trunk/include/llvm/ADT/Twine.h Wed Nov 18 18:04:43 2009
@@ -133,9 +133,9 @@
/// Null or Empty kinds.
const void *RHS;
/// 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().
- NodeKind RHSKind : 8;
+ unsigned char RHSKind;
private:
/// Construct a nullary twine; the kind must be NullKind or EmptyKind.
@@ -209,10 +209,10 @@
}
/// 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.
- NodeKind getRHSKind() const { return RHSKind; }
+ NodeKind getRHSKind() const { return (NodeKind) RHSKind; }
/// printOneChild - Print one child from a twine.
void printOneChild(raw_ostream &OS, const void *Ptr, NodeKind Kind) const;
More information about the llvm-commits
mailing list