OLD | NEW |
1 //===- subzero/src/PNaClTranslator.cpp - ICE from bitcode -----------------===// | 1 //===- subzero/src/PNaClTranslator.cpp - ICE from bitcode -----------------===// |
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 implements the PNaCl bitcode file to Ice, to machine code | 10 // This file implements the PNaCl bitcode file to Ice, to machine code |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 for (size_t i = 0; i < ValueIDValues.size(); ++i) { | 794 for (size_t i = 0; i < ValueIDValues.size(); ++i) { |
795 errs() << "[" << i << "]: " << *ValueIDValues[i] << "\n"; | 795 errs() << "[" << i << "]: " << *ValueIDValues[i] << "\n"; |
796 } | 796 } |
797 return ReturnValue; | 797 return ReturnValue; |
798 } | 798 } |
799 // Generate error message by using default block implementation. | 799 // Generate error message by using default block implementation. |
800 BlockParserBaseClass Parser(BlockID, this); | 800 BlockParserBaseClass Parser(BlockID, this); |
801 return Parser.ParseThisBlock(); | 801 return Parser.ParseThisBlock(); |
802 } | 802 } |
803 | 803 |
804 } // end of anonymous namespace. | 804 } // end of anonymous namespace |
805 | 805 |
806 namespace Ice { | 806 namespace Ice { |
807 | 807 |
808 void PNaClTranslator::translate(const std::string &IRFilename) { | 808 void PNaClTranslator::translate(const std::string &IRFilename) { |
809 OwningPtr<MemoryBuffer> MemBuf; | 809 OwningPtr<MemoryBuffer> MemBuf; |
810 if (error_code ec = | 810 if (error_code ec = |
811 MemoryBuffer::getFileOrSTDIN(IRFilename.c_str(), MemBuf)) { | 811 MemoryBuffer::getFileOrSTDIN(IRFilename.c_str(), MemBuf)) { |
812 errs() << "Error reading '" << IRFilename << "': " << ec.message() << "\n"; | 812 errs() << "Error reading '" << IRFilename << "': " << ec.message() << "\n"; |
813 ErrorStatus = true; | 813 ErrorStatus = true; |
814 return; | 814 return; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 | 849 |
850 if (TopLevelBlocks != 1) { | 850 if (TopLevelBlocks != 1) { |
851 errs() << IRFilename | 851 errs() << IRFilename |
852 << ": Contains more than one module. Found: " << TopLevelBlocks | 852 << ": Contains more than one module. Found: " << TopLevelBlocks |
853 << "\n"; | 853 << "\n"; |
854 ErrorStatus = true; | 854 ErrorStatus = true; |
855 } | 855 } |
856 return; | 856 return; |
857 } | 857 } |
858 | 858 |
859 } // end of anonymous namespace. | 859 } // end of namespace Ice |
OLD | NEW |