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 2660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2671 } | 2671 } |
2672 | 2672 |
2673 void FunctionValuesymtabParser::setBbName(uint64_t Index, StringType &Name) { | 2673 void FunctionValuesymtabParser::setBbName(uint64_t Index, StringType &Name) { |
2674 if (isIRGenerationDisabled()) | 2674 if (isIRGenerationDisabled()) |
2675 return; | 2675 return; |
2676 if (Index >= getFunctionParser()->getFunc()->getNumNodes()) { | 2676 if (Index >= getFunctionParser()->getFunc()->getNumNodes()) { |
2677 reportUnableToAssign("block", Index, Name); | 2677 reportUnableToAssign("block", Index, Name); |
2678 return; | 2678 return; |
2679 } | 2679 } |
2680 std::string Nm(Name.data(), Name.size()); | 2680 std::string Nm(Name.data(), Name.size()); |
2681 getFunctionParser()->getFunc()->getNodes()[Index]->setName(Nm); | 2681 if (ALLOW_DUMP) |
| 2682 getFunctionParser()->getFunc()->getNodes()[Index]->setName(Nm); |
2682 } | 2683 } |
2683 | 2684 |
2684 bool FunctionParser::ParseBlock(unsigned BlockID) { | 2685 bool FunctionParser::ParseBlock(unsigned BlockID) { |
2685 switch (BlockID) { | 2686 switch (BlockID) { |
2686 case naclbitc::CONSTANTS_BLOCK_ID: { | 2687 case naclbitc::CONSTANTS_BLOCK_ID: { |
2687 ConstantsParser Parser(BlockID, this); | 2688 ConstantsParser Parser(BlockID, this); |
2688 return Parser.ParseThisBlock(); | 2689 return Parser.ParseThisBlock(); |
2689 } | 2690 } |
2690 case naclbitc::VALUE_SYMTAB_BLOCK_ID: { | 2691 case naclbitc::VALUE_SYMTAB_BLOCK_ID: { |
2691 if (PNaClAllowLocalSymbolTables) { | 2692 if (PNaClAllowLocalSymbolTables) { |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2938 | 2939 |
2939 if (TopLevelBlocks != 1) { | 2940 if (TopLevelBlocks != 1) { |
2940 errs() << IRFilename | 2941 errs() << IRFilename |
2941 << ": Contains more than one module. Found: " << TopLevelBlocks | 2942 << ": Contains more than one module. Found: " << TopLevelBlocks |
2942 << "\n"; | 2943 << "\n"; |
2943 ErrorStatus = true; | 2944 ErrorStatus = true; |
2944 } | 2945 } |
2945 } | 2946 } |
2946 | 2947 |
2947 } // end of namespace Ice | 2948 } // end of namespace Ice |
OLD | NEW |