Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: src/PNaClTranslator.cpp

Issue 1202253002: Includes module header first. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/IceConverter.cpp ('K') | « src/IceTypes.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
16
15 #include "llvm/ADT/SmallString.h" 17 #include "llvm/ADT/SmallString.h"
16 #include "llvm/Bitcode/NaCl/NaClBitcodeDecoders.h" 18 #include "llvm/Bitcode/NaCl/NaClBitcodeDecoders.h"
17 #include "llvm/Bitcode/NaCl/NaClBitcodeHeader.h" 19 #include "llvm/Bitcode/NaCl/NaClBitcodeHeader.h"
18 #include "llvm/Bitcode/NaCl/NaClBitcodeParser.h" 20 #include "llvm/Bitcode/NaCl/NaClBitcodeParser.h"
19 #include "llvm/Bitcode/NaCl/NaClReaderWriter.h" 21 #include "llvm/Bitcode/NaCl/NaClReaderWriter.h"
20 #include "llvm/Support/Format.h" 22 #include "llvm/Support/Format.h"
21 #include "llvm/Support/MemoryBuffer.h" 23 #include "llvm/Support/MemoryBuffer.h"
22 #include "llvm/Support/raw_ostream.h" 24 #include "llvm/Support/raw_ostream.h"
23 25
24 #include "IceAPInt.h" 26 #include "IceAPInt.h"
25 #include "IceAPFloat.h" 27 #include "IceAPFloat.h"
26 #include "IceCfg.h" 28 #include "IceCfg.h"
27 #include "IceCfgNode.h" 29 #include "IceCfgNode.h"
28 #include "IceClFlags.h" 30 #include "IceClFlags.h"
29 #include "IceDefs.h" 31 #include "IceDefs.h"
30 #include "IceGlobalInits.h" 32 #include "IceGlobalInits.h"
31 #include "IceInst.h" 33 #include "IceInst.h"
32 #include "IceOperand.h" 34 #include "IceOperand.h"
33 #include "PNaClTranslator.h"
34 35
35 namespace { 36 namespace {
36 using namespace llvm; 37 using namespace llvm;
37 38
38 // Models elements in the list of types defined in the types block. 39 // Models elements in the list of types defined in the types block.
39 // These elements can be undefined, a (simple) type, or a function type 40 // These elements can be undefined, a (simple) type, or a function type
40 // signature. Note that an extended type is undefined on construction. 41 // signature. Note that an extended type is undefined on construction.
41 // Use methods setAsSimpleType and setAsFuncSigType to define 42 // Use methods setAsSimpleType and setAsFuncSigType to define
42 // the extended type. 43 // the extended type.
43 class ExtendedType { 44 class ExtendedType {
(...skipping 2980 matching lines...) Expand 10 before | Expand all | Expand 10 after
3024 } 3025 }
3025 if (InputStreamFile.getBitcodeBytes().getExtent() % 4 != 0) { 3026 if (InputStreamFile.getBitcodeBytes().getExtent() % 4 != 0) {
3026 ErrStream 3027 ErrStream
3027 << IRFilename 3028 << IRFilename
3028 << ": Bitcode stream should be a multiple of 4 bytes in length.\n"; 3029 << ": Bitcode stream should be a multiple of 4 bytes in length.\n";
3029 llvm::report_fatal_error("Bitcode stream should be a multiple of 4 bytes"); 3030 llvm::report_fatal_error("Bitcode stream should be a multiple of 4 bytes");
3030 } 3031 }
3031 } 3032 }
3032 3033
3033 } // end of namespace Ice 3034 } // end of namespace Ice
OLDNEW
« src/IceConverter.cpp ('K') | « src/IceTypes.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698