diff options
author | Dan Gohman <gohman@apple.com> | 2009-11-24 01:48:15 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-11-24 01:48:15 +0000 |
commit | 9e763b88b0c194924eed1de00d17f421a9222181 (patch) | |
tree | 82e60157d3637a098ed1a0cf894527a1d093ec08 | |
parent | 193f720f118f52eb05de172d936a440f335c1469 (diff) | |
download | llvm-9e763b88b0c194924eed1de00d17f421a9222181.tar.gz llvm-9e763b88b0c194924eed1de00d17f421a9222181.tar.bz2 llvm-9e763b88b0c194924eed1de00d17f421a9222181.tar.xz |
Delete some dead and non-obvious code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89729 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | utils/TableGen/Record.cpp | 49 | ||||
-rw-r--r-- | utils/TableGen/Record.h | 6 |
2 files changed, 0 insertions, 55 deletions
diff --git a/utils/TableGen/Record.cpp b/utils/TableGen/Record.cpp index 3f952b44a9..53f90146a7 100644 --- a/utils/TableGen/Record.cpp +++ b/utils/TableGen/Record.cpp @@ -346,10 +346,6 @@ Init *BitsInit::convertInitializerBitRange(const std::vector<unsigned> &Bits) { } std::string BitsInit::getAsString() const { - //if (!printInHex(OS)) return; - //if (!printAsVariable(OS)) return; - //if (!printAsUnset(OS)) return; - std::string Result = "{ "; for (unsigned i = 0, e = getNumBits(); i != e; ++i) { if (i) Result += ", "; @@ -361,51 +357,6 @@ std::string BitsInit::getAsString() const { return Result + " }"; } -bool BitsInit::printInHex(raw_ostream &OS) const { - // First, attempt to convert the value into an integer value... - int64_t Result = 0; - for (unsigned i = 0, e = getNumBits(); i != e; ++i) - if (BitInit *Bit = dynamic_cast<BitInit*>(getBit(i))) { - Result |= Bit->getValue() << i; - } else { - return true; - } - - OS << format("0x%x", Result); - return false; -} - -bool BitsInit::printAsVariable(raw_ostream &OS) const { - // Get the variable that we may be set equal to... - assert(getNumBits() != 0); - VarBitInit *FirstBit = dynamic_cast<VarBitInit*>(getBit(0)); - if (FirstBit == 0) return true; - TypedInit *Var = FirstBit->getVariable(); - - // Check to make sure the types are compatible. - BitsRecTy *Ty = dynamic_cast<BitsRecTy*>(FirstBit->getVariable()->getType()); - if (Ty == 0) return true; - if (Ty->getNumBits() != getNumBits()) return true; // Incompatible types! - - // Check to make sure all bits are referring to the right bits in the variable - for (unsigned i = 0, e = getNumBits(); i != e; ++i) { - VarBitInit *Bit = dynamic_cast<VarBitInit*>(getBit(i)); - if (Bit == 0 || Bit->getVariable() != Var || Bit->getBitNum() != i) - return true; - } - - Var->print(OS); - return false; -} - -bool BitsInit::printAsUnset(raw_ostream &OS) const { - for (unsigned i = 0, e = getNumBits(); i != e; ++i) - if (!dynamic_cast<UnsetInit*>(getBit(i))) - return true; - OS << "?"; - return false; -} - // resolveReferences - If there are any field references that refer to fields // that have been filled in, we can propagate the values now. // diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h index 4384c42d26..278c349dd6 100644 --- a/utils/TableGen/Record.h +++ b/utils/TableGen/Record.h @@ -611,12 +611,6 @@ public: virtual std::string getAsString() const; virtual Init *resolveReferences(Record &R, const RecordVal *RV); - - // printXX - Print this bitstream with the specified format, returning true if - // it is not possible. - bool printInHex(raw_ostream &OS) const; - bool printAsVariable(raw_ostream &OS) const; - bool printAsUnset(raw_ostream &OS) const; }; |