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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 ErrorStatus(ErrorStatus), NumErrors(0), NumFunctionIds(0), | 175 ErrorStatus(ErrorStatus), NumErrors(0), NumFunctionIds(0), |
176 NumFunctionBlocks(0) { | 176 NumFunctionBlocks(0) { |
177 Mod->setDataLayout(PNaClDataLayout); | 177 Mod->setDataLayout(PNaClDataLayout); |
178 setErrStream(Translator.getContext()->getStrDump()); | 178 setErrStream(Translator.getContext()->getStrDump()); |
179 } | 179 } |
180 | 180 |
181 ~TopLevelParser() override {} | 181 ~TopLevelParser() override {} |
182 | 182 |
183 Ice::Translator &getTranslator() { return Translator; } | 183 Ice::Translator &getTranslator() { return Translator; } |
184 | 184 |
| 185 // Need some way to access the Ice::ELFObjectWriter. |
| 186 |
185 // Generates error with given Message. Always returns true. | 187 // Generates error with given Message. Always returns true. |
186 bool Error(const std::string &Message) override { | 188 bool Error(const std::string &Message) override { |
187 ErrorStatus = true; | 189 ErrorStatus = true; |
188 ++NumErrors; | 190 ++NumErrors; |
189 NaClBitcodeParser::Error(Message); | 191 NaClBitcodeParser::Error(Message); |
190 if (!AllowErrorRecovery) | 192 if (!AllowErrorRecovery) |
191 report_fatal_error("Unable to continue"); | 193 report_fatal_error("Unable to continue"); |
192 return true; | 194 return true; |
193 } | 195 } |
194 | 196 |
(...skipping 2677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2872 | 2874 |
2873 if (TopLevelBlocks != 1) { | 2875 if (TopLevelBlocks != 1) { |
2874 errs() << IRFilename | 2876 errs() << IRFilename |
2875 << ": Contains more than one module. Found: " << TopLevelBlocks | 2877 << ": Contains more than one module. Found: " << TopLevelBlocks |
2876 << "\n"; | 2878 << "\n"; |
2877 ErrorStatus = true; | 2879 ErrorStatus = true; |
2878 } | 2880 } |
2879 } | 2881 } |
2880 | 2882 |
2881 } // end of namespace Ice | 2883 } // end of namespace Ice |
OLD | NEW |