| 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 |
| 11 // translator. | 11 // translator. |
| 12 // | 12 // |
| 13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 14 | 14 |
| 15 #include "PNaClTranslator.h" | 15 #include "PNaClTranslator.h" |
| 16 | 16 |
| 17 #include "IceAPInt.h" | 17 #include "IceAPInt.h" |
| 18 #include "IceAPFloat.h" | 18 #include "IceAPFloat.h" |
| 19 #include "IceCfg.h" | 19 #include "IceCfg.h" |
| 20 #include "IceCfgNode.h" | 20 #include "IceCfgNode.h" |
| 21 #include "IceClFlags.h" | 21 #include "IceClFlags.h" |
| 22 #include "IceDefs.h" | 22 #include "IceDefs.h" |
| 23 #include "IceGlobalInits.h" | 23 #include "IceGlobalInits.h" |
| 24 #include "IceInst.h" | 24 #include "IceInst.h" |
| 25 #include "IceOperand.h" | 25 #include "IceOperand.h" |
| 26 |
| 27 #pragma clang diagnostic push |
| 28 #pragma clang diagnostic ignored "-Wunused-parameter" |
| 26 #include "llvm/ADT/SmallString.h" | 29 #include "llvm/ADT/SmallString.h" |
| 27 #include "llvm/Bitcode/NaCl/NaClBitcodeDecoders.h" | 30 #include "llvm/Bitcode/NaCl/NaClBitcodeDecoders.h" |
| 28 #include "llvm/Bitcode/NaCl/NaClBitcodeDefs.h" | 31 #include "llvm/Bitcode/NaCl/NaClBitcodeDefs.h" |
| 29 #include "llvm/Bitcode/NaCl/NaClBitcodeHeader.h" | 32 #include "llvm/Bitcode/NaCl/NaClBitcodeHeader.h" |
| 30 #include "llvm/Bitcode/NaCl/NaClBitcodeParser.h" | 33 #include "llvm/Bitcode/NaCl/NaClBitcodeParser.h" |
| 31 #include "llvm/Bitcode/NaCl/NaClReaderWriter.h" | 34 #include "llvm/Bitcode/NaCl/NaClReaderWriter.h" |
| 32 #include "llvm/Support/Format.h" | 35 #include "llvm/Support/Format.h" |
| 33 #include "llvm/Support/MemoryBuffer.h" | 36 #include "llvm/Support/MemoryBuffer.h" |
| 34 #include "llvm/Support/raw_ostream.h" | 37 #include "llvm/Support/raw_ostream.h" |
| 38 #pragma clang diagnostic pop |
| 35 | 39 |
| 36 namespace { | 40 namespace { |
| 37 using namespace llvm; | 41 using namespace llvm; |
| 38 | 42 |
| 39 // Models elements in the list of types defined in the types block. | 43 // Models elements in the list of types defined in the types block. |
| 40 // These elements can be undefined, a (simple) type, or a function type | 44 // These elements can be undefined, a (simple) type, or a function type |
| 41 // signature. Note that an extended type is undefined on construction. | 45 // signature. Note that an extended type is undefined on construction. |
| 42 // Use methods setAsSimpleType and setAsFuncSigType to define | 46 // Use methods setAsSimpleType and setAsFuncSigType to define |
| 43 // the extended type. | 47 // the extended type. |
| 44 class ExtendedType { | 48 class ExtendedType { |
| (...skipping 3051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3096 } | 3100 } |
| 3097 if (InputStreamFile.getBitcodeBytes().getExtent() % 4 != 0) { | 3101 if (InputStreamFile.getBitcodeBytes().getExtent() % 4 != 0) { |
| 3098 ErrStream | 3102 ErrStream |
| 3099 << IRFilename | 3103 << IRFilename |
| 3100 << ": Bitcode stream should be a multiple of 4 bytes in length.\n"; | 3104 << ": Bitcode stream should be a multiple of 4 bytes in length.\n"; |
| 3101 llvm::report_fatal_error("Bitcode stream should be a multiple of 4 bytes"); | 3105 llvm::report_fatal_error("Bitcode stream should be a multiple of 4 bytes"); |
| 3102 } | 3106 } |
| 3103 } | 3107 } |
| 3104 | 3108 |
| 3105 } // end of namespace Ice | 3109 } // end of namespace Ice |
| OLD | NEW |