| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 Name = FunctionDeclarationList[ID]->getName(); | 292 Name = FunctionDeclarationList[ID]->getName(); |
| 293 } else if ((ID - FcnIDSize) < VariableDeclarations.size()) { | 293 } else if ((ID - FcnIDSize) < VariableDeclarations.size()) { |
| 294 Name = VariableDeclarations[ID - FcnIDSize]->getName(); | 294 Name = VariableDeclarations[ID - FcnIDSize]->getName(); |
| 295 } else { | 295 } else { |
| 296 std::string Buffer; | 296 std::string Buffer; |
| 297 raw_string_ostream StrBuf(Buffer); | 297 raw_string_ostream StrBuf(Buffer); |
| 298 StrBuf << "Reference to global not defined: " << ID; | 298 StrBuf << "Reference to global not defined: " << ID; |
| 299 Error(StrBuf.str()); | 299 Error(StrBuf.str()); |
| 300 Name = "??"; | 300 Name = "??"; |
| 301 } | 301 } |
| 302 const uint64_t Offset = 0; | 302 const Ice::RelocOffsetT Offset = 0; |
| 303 C = getTranslator().getContext()->getConstantSym( | 303 C = getTranslator().getContext()->getConstantSym( |
| 304 getIcePointerType(), Offset, Name); | 304 getIcePointerType(), Offset, Name); |
| 305 ValueIDConstants[ID] = C; | 305 ValueIDConstants[ID] = C; |
| 306 return C; | 306 return C; |
| 307 } | 307 } |
| 308 | 308 |
| 309 /// Returns the number of function declarations in the bitcode file. | 309 /// Returns the number of function declarations in the bitcode file. |
| 310 unsigned getNumFunctionIDs() const { return NumFunctionIds; } | 310 unsigned getNumFunctionIDs() const { return NumFunctionIds; } |
| 311 | 311 |
| 312 /// Returns the number of global declarations (i.e. IDs) defined in | 312 /// Returns the number of global declarations (i.e. IDs) defined in |
| (...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2591 | 2591 |
| 2592 if (TopLevelBlocks != 1) { | 2592 if (TopLevelBlocks != 1) { |
| 2593 errs() << IRFilename | 2593 errs() << IRFilename |
| 2594 << ": Contains more than one module. Found: " << TopLevelBlocks | 2594 << ": Contains more than one module. Found: " << TopLevelBlocks |
| 2595 << "\n"; | 2595 << "\n"; |
| 2596 ErrorStatus = true; | 2596 ErrorStatus = true; |
| 2597 } | 2597 } |
| 2598 } | 2598 } |
| 2599 | 2599 |
| 2600 } // end of namespace Ice | 2600 } // end of namespace Ice |
| OLD | NEW |