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 | 003f9445a475809f93a5141770aa871eb1c548b2 (patch) | |
tree | 82e60157d3637a098ed1a0cf894527a1d093ec08 | |
parent | ec13b4fffb1742d8acd6e07a388b1e54dfd7c1c9 (diff) | |
download | external_llvm-003f9445a475809f93a5141770aa871eb1c548b2.zip external_llvm-003f9445a475809f93a5141770aa871eb1c548b2.tar.gz external_llvm-003f9445a475809f93a5141770aa871eb1c548b2.tar.bz2 |
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 3f952b44..53f9014 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 4384c42..278c349 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; }; |