diff --git a/support/tools/TableGen/Record.cpp b/support/tools/TableGen/Record.cpp index b33e5e774b7..469faa9b01b 100644 --- a/support/tools/TableGen/Record.cpp +++ b/support/tools/TableGen/Record.cpp @@ -153,7 +153,10 @@ void BitsInit::print(std::ostream &OS) const { OS << "{ "; for (unsigned i = 0, e = getNumBits(); i != e; ++i) { if (i) OS << ", "; - getBit(e-i-1)->print(OS); + if (Init *Bit = getBit(e-i-1)) + Bit->print(OS); + else + OS << "*"; } OS << " }"; } diff --git a/utils/TableGen/Record.cpp b/utils/TableGen/Record.cpp index b33e5e774b7..469faa9b01b 100644 --- a/utils/TableGen/Record.cpp +++ b/utils/TableGen/Record.cpp @@ -153,7 +153,10 @@ void BitsInit::print(std::ostream &OS) const { OS << "{ "; for (unsigned i = 0, e = getNumBits(); i != e; ++i) { if (i) OS << ", "; - getBit(e-i-1)->print(OS); + if (Init *Bit = getBit(e-i-1)) + Bit->print(OS); + else + OS << "*"; } OS << " }"; }