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

Side by Side Diff: src/IceGlobalInits.cpp

Issue 1202253002: Includes module header first. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Changes All Subzero includes to match LLVM style guide. 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
OLDNEW
1 //===- subzero/src/IceGlobalInits.cpp - Global declarations ---------------===// 1 //===- subzero/src/IceGlobalInits.cpp - Global declarations ---------------===//
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 notion of function declarations, global 10 // This file implements the notion of function declarations, global
11 // variable declarations, and the corresponding variable initializers 11 // variable declarations, and the corresponding variable initializers
12 // in Subzero. 12 // in Subzero.
13 // 13 //
14 //===----------------------------------------------------------------------===// 14 //===----------------------------------------------------------------------===//
15 15
16 #include "IceGlobalInits.h"
17
18 #include "IceDefs.h"
19 #include "IceGlobalContext.h"
20 #include "IceTypes.h"
16 #include "llvm/ADT/STLExtras.h" 21 #include "llvm/ADT/STLExtras.h"
17 #include "llvm/IR/Function.h" 22 #include "llvm/IR/Function.h"
18 #include "llvm/IR/Value.h" 23 #include "llvm/IR/Value.h"
19 24
20 #include "IceDefs.h"
21 #include "IceGlobalContext.h"
22 #include "IceGlobalInits.h"
23 #include "IceTypes.h"
24 25
25 namespace { 26 namespace {
26 char hexdigit(unsigned X) { return X < 10 ? '0' + X : 'A' + X - 10; } 27 char hexdigit(unsigned X) { return X < 10 ? '0' + X : 'A' + X - 10; }
27 28
28 void dumpLinkage(Ice::Ostream &Stream, 29 void dumpLinkage(Ice::Ostream &Stream,
29 llvm::GlobalValue::LinkageTypes Linkage) { 30 llvm::GlobalValue::LinkageTypes Linkage) {
30 if (!ALLOW_DUMP) 31 if (!ALLOW_DUMP)
31 return; 32 return;
32 switch (Linkage) { 33 switch (Linkage) {
33 case llvm::GlobalValue::ExternalLinkage: 34 case llvm::GlobalValue::ExternalLinkage:
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 dumpType(Stream); 198 dumpType(Stream);
198 Stream << ")"; 199 Stream << ")";
199 if (Offset != 0) { 200 if (Offset != 0) {
200 Stream << ", "; 201 Stream << ", ";
201 dumpType(Stream); 202 dumpType(Stream);
202 Stream << " " << Offset << ")"; 203 Stream << " " << Offset << ")";
203 } 204 }
204 } 205 }
205 206
206 } // end of namespace Ice 207 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698