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 2172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2183 Address->setName(Trans.createUnnamedName(GlobalPrefix, NameIndex)); | 2183 Address->setName(Trans.createUnnamedName(GlobalPrefix, NameIndex)); |
2184 ++NameIndex; | 2184 ++NameIndex; |
2185 } else { | 2185 } else { |
2186 Trans.checkIfUnnamedNameSafe(Address->getName(), "global", | 2186 Trans.checkIfUnnamedNameSafe(Address->getName(), "global", |
2187 GlobalPrefix, | 2187 GlobalPrefix, |
2188 Trans.getContext()->getStrDump()); | 2188 Trans.getContext()->getStrDump()); |
2189 } | 2189 } |
2190 } | 2190 } |
2191 } | 2191 } |
2192 Trans.nameUnnamedFunctions(Context->getModule()); | 2192 Trans.nameUnnamedFunctions(Context->getModule()); |
2193 if (!getFlags().DisableGlobals) | 2193 getTranslator().lowerGlobals(Context->getGlobalIDAddresses()); |
2194 getTranslator().lowerGlobals(Context->getGlobalIDAddresses()); | |
2195 GlobalAddressNamesAndInitializersInstalled = true; | 2194 GlobalAddressNamesAndInitializersInstalled = true; |
2196 } | 2195 } |
2197 } | 2196 } |
2198 | 2197 |
2199 bool ParseBlock(unsigned BlockID) override; | 2198 bool ParseBlock(unsigned BlockID) override; |
2200 | 2199 |
2201 void ExitBlock() override { | 2200 void ExitBlock() override { |
2202 InstallGlobalAddressNamesAndInitializers(); | 2201 InstallGlobalAddressNamesAndInitializers(); |
2203 getTranslator().emitConstants(); | 2202 getTranslator().emitConstants(); |
2204 } | 2203 } |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2396 | 2395 |
2397 if (TopLevelBlocks != 1) { | 2396 if (TopLevelBlocks != 1) { |
2398 errs() << IRFilename | 2397 errs() << IRFilename |
2399 << ": Contains more than one module. Found: " << TopLevelBlocks | 2398 << ": Contains more than one module. Found: " << TopLevelBlocks |
2400 << "\n"; | 2399 << "\n"; |
2401 ErrorStatus = true; | 2400 ErrorStatus = true; |
2402 } | 2401 } |
2403 } | 2402 } |
2404 | 2403 |
2405 } // end of namespace Ice | 2404 } // end of namespace Ice |
OLD | NEW |