[llvm-commits] [hlvm] r38198 - in /hlvm/trunk/hlvm/AST: Type.cpp Type.h
Reid Spencer
reid at x10sys.com
Sat Jul 7 17:01:05 PDT 2007
Author: reid
Date: Sat Jul 7 19:01:04 2007
New Revision: 38198
URL: http://llvm.org/viewvc/llvm-project?rev=38198&view=rev
Log:
Fix build breakage. numBits is not a field of IntegerType any more.
Modified:
hlvm/trunk/hlvm/AST/Type.cpp
hlvm/trunk/hlvm/AST/Type.h
Modified: hlvm/trunk/hlvm/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/Type.cpp?rev=38198&r1=38197&r2=38198&view=diff
==============================================================================
--- hlvm/trunk/hlvm/AST/Type.cpp (original)
+++ hlvm/trunk/hlvm/AST/Type.cpp Sat Jul 7 19:01:04 2007
@@ -93,6 +93,7 @@
const char*
IntegerType::getPrimitiveName() const
{
+ int16_t numBits = getBits();
if (numBits > 128)
return 0;
Modified: hlvm/trunk/hlvm/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/Type.h?rev=38198&r1=38197&r2=38198&view=diff
==============================================================================
--- hlvm/trunk/hlvm/AST/Type.h (original)
+++ hlvm/trunk/hlvm/AST/Type.h Sat Jul 7 19:01:04 2007
@@ -237,7 +237,8 @@
NodeIDs id, ///< The node type identifier, passed on to Node base class
int16_t bits = 32, ///< The number of bits in this integer type
bool sign = true ///< Indicates if this is a signed integer type, or not.
- ) : Type(id), numBits(bits) {
+ ) : Type(id) {
+ setBits(bits);
setSigned(sign);
}
@@ -254,7 +255,7 @@
virtual const char* getPrimitiveName() const;
/// @brief Return the number of bits in this integer type
- int16_t getBits() const { return int16_t(numBits&0x7FFF); }
+ int16_t getBits() const { return int16_t(flags & 0x7FFF); }
/// @brief Return the signedness of this type
bool isSigned() const { return flags & 0x8000; }
@@ -270,7 +271,7 @@
/// An int
/// @brief Set the number of bits for this integer type
void setBits(int16_t bits) {
- numBits &= 0x8000; numBits |= uint16_t(bits)&0x7FFF; }
+ flags &= 0x8000; flags |= uint16_t(bits)&0x7FFF; }
/// @brief Set the signedness of the type
void setSigned(bool isSigned) {
More information about the llvm-commits
mailing list