OLD | NEW |
1 //===- subzero/src/llvm2ice.cpp - Driver for testing ----------------------===// | 1 //===- subzero/src/llvm2ice.cpp - Driver for testing ----------------------===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file defines a driver that uses LLVM capabilities to parse a | 10 // This file defines a driver that uses LLVM capabilities to parse a |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 if (Call->getDest() != NULL) { | 592 if (Call->getDest() != NULL) { |
593 report_fatal_error( | 593 report_fatal_error( |
594 "Return value for intrinsic func w/ void return type."); | 594 "Return value for intrinsic func w/ void return type."); |
595 } | 595 } |
596 } else { | 596 } else { |
597 if (I->Signature[0] != Call->getDest()->getType()) { | 597 if (I->Signature[0] != Call->getDest()->getType()) { |
598 report_fatal_error("Mismatched return types."); | 598 report_fatal_error("Mismatched return types."); |
599 } | 599 } |
600 } | 600 } |
601 if (Call->getNumArgs() + 1 != I->NumTypes) { | 601 if (Call->getNumArgs() + 1 != I->NumTypes) { |
602 std::cerr << "Call->getNumArgs() " << (int)Call->getNumArgs() | |
603 << " I->NumTypes " << (int)I->NumTypes << "\n"; | |
604 report_fatal_error("Mismatched # of args."); | 602 report_fatal_error("Mismatched # of args."); |
605 } | 603 } |
606 for (size_t i = 1; i < I->NumTypes; ++i) { | 604 for (size_t i = 1; i < I->NumTypes; ++i) { |
607 if (Call->getArg(i - 1)->getType() != I->Signature[i]) { | 605 if (Call->getArg(i - 1)->getType() != I->Signature[i]) { |
608 report_fatal_error("Mismatched argument type."); | 606 report_fatal_error("Mismatched argument type."); |
609 } | 607 } |
610 } | 608 } |
611 } | 609 } |
612 | 610 |
613 private: | 611 private: |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 << " sec\n"; | 776 << " sec\n"; |
779 } | 777 } |
780 } | 778 } |
781 } | 779 } |
782 | 780 |
783 if (!DisableTranslation && Func) | 781 if (!DisableTranslation && Func) |
784 Func->getTarget()->emitConstants(); | 782 Func->getTarget()->emitConstants(); |
785 | 783 |
786 return ExitStatus; | 784 return ExitStatus; |
787 } | 785 } |
OLD | NEW |