OLD | NEW |
1 //===-- NaClObjDump.cpp - Dump PNaCl bitcode contents ---------------------===// | 1 //===-- NaClObjDump.cpp - Dump PNaCl bitcode contents ---------------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
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 #include "llvm/ADT/STLExtras.h" | 10 #include "llvm/ADT/STLExtras.h" |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 unsigned Alignment = NaClPossibleLoadStoreAlignments[i]; | 543 unsigned Alignment = NaClPossibleLoadStoreAlignments[i]; |
544 if (PNaClABIProps::isAllowedAlignment(&DL, Alignment, Ty)) { | 544 if (PNaClABIProps::isAllowedAlignment(&DL, Alignment, Ty)) { |
545 ValidAlignments.push_back(Alignment); | 545 ValidAlignments.push_back(Alignment); |
546 } | 546 } |
547 } | 547 } |
548 } | 548 } |
549 | 549 |
550 /// Top-level class to parse bitcode file and transform to | 550 /// Top-level class to parse bitcode file and transform to |
551 /// corresponding disassembled code. | 551 /// corresponding disassembled code. |
552 class NaClDisTopLevelParser : public NaClBitcodeParser { | 552 class NaClDisTopLevelParser : public NaClBitcodeParser { |
553 NaClDisTopLevelParser(const NaClDisTopLevelParser&) LLVM_DELETED_FUNCTION; | 553 NaClDisTopLevelParser(const NaClDisTopLevelParser&) = delete; |
554 void operator=(const NaClDisTopLevelParser&) LLVM_DELETED_FUNCTION; | 554 void operator=(const NaClDisTopLevelParser&) = delete; |
555 | 555 |
556 public: | 556 public: |
557 NaClDisTopLevelParser(NaClBitcodeHeader &Header, | 557 NaClDisTopLevelParser(NaClBitcodeHeader &Header, |
558 NaClBitstreamCursor &Cursor, | 558 NaClBitstreamCursor &Cursor, |
559 naclbitc::ObjDumpStream &ObjDump) | 559 naclbitc::ObjDumpStream &ObjDump) |
560 : NaClBitcodeParser(Cursor), | 560 : NaClBitcodeParser(Cursor), |
561 Mod("ObjDump", getGlobalContext()), | 561 Mod("ObjDump", getGlobalContext()), |
562 ObjDump(ObjDump), | 562 ObjDump(ObjDump), |
563 AbbrevListener(this), | 563 AbbrevListener(this), |
564 DL(&Mod), | 564 DL(&Mod), |
(...skipping 2998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3563 ObjDump.Error() << "Expected 1 top level block in bitcode: Found:" | 3563 ObjDump.Error() << "Expected 1 top level block in bitcode: Found:" |
3564 << NumBlocksRead << "\n"; | 3564 << NumBlocksRead << "\n"; |
3565 ErrorsFound = true; | 3565 ErrorsFound = true; |
3566 } | 3566 } |
3567 | 3567 |
3568 ObjDump.Flush(); | 3568 ObjDump.Flush(); |
3569 return ErrorsFound || Parser.GetNumErrors() > 0; | 3569 return ErrorsFound || Parser.GetNumErrors() > 0; |
3570 } | 3570 } |
3571 | 3571 |
3572 } | 3572 } |
OLD | NEW |