diff options
author | Dan Gohman <gohman@apple.com> | 2008-11-05 18:30:52 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-11-05 18:30:52 +0000 |
commit | 28c04dab38fa7205fedbc8954f08e2250e84c273 (patch) | |
tree | 64e193cd9f2c2639cfc1d928cf730b7661a2c05f /utils/TableGen | |
parent | fbcb52afdffa588a523cc0d3cd38923685c5caae (diff) | |
download | external_llvm-28c04dab38fa7205fedbc8954f08e2250e84c273.zip external_llvm-28c04dab38fa7205fedbc8954f08e2250e84c273.tar.gz external_llvm-28c04dab38fa7205fedbc8954f08e2250e84c273.tar.bz2 |
Use an assert to check that SelectCode isn't called on
nodes that are already selected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58763 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index 1829331..3f86d2d 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -1957,13 +1957,12 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) { OS << "// The main instruction selector code.\n" << "SDNode *SelectCode(SDValue N) {\n" - << " if (N.isMachineOpcode()) {\n" - << " return NULL; // Already selected.\n" - << " }\n\n" << " MVT::SimpleValueType NVT = N.getNode()->getValueType(0).getSimpleVT();\n" << " switch (N.getOpcode()) {\n" - << " default: break;\n" - << " case ISD::EntryToken: // These leaves remain the same.\n" + << " default:\n" + << " assert(!N.isMachineOpcode() && \"Node already selected!\");\n" + << " break;\n" + << " case ISD::EntryToken: // These nodes remain the same.\n" << " case ISD::MEMOPERAND:\n" << " case ISD::BasicBlock:\n" << " case ISD::Register:\n" |