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

Side by Side Diff: src/IceGlobalInits.cpp

Issue 1221643012: Subzero: Add -Wshadow to the build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Change the previous underscore naming style Created 5 years, 5 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" 16 #include "IceGlobalInits.h"
17 17
18 #include "IceDefs.h" 18 #include "IceDefs.h"
19 #include "IceGlobalContext.h" 19 #include "IceGlobalContext.h"
20 #include "IceTypes.h" 20 #include "IceTypes.h"
21
22 #pragma clang diagnostic push
23 #pragma clang diagnostic ignored "-Wunused-parameter"
24 #pragma clang diagnostic ignored "-Wshadow"
21 #include "llvm/ADT/STLExtras.h" 25 #include "llvm/ADT/STLExtras.h"
22 #include "llvm/IR/Function.h" 26 #include "llvm/IR/Function.h"
23 #include "llvm/IR/Value.h" 27 #include "llvm/IR/Value.h"
28 #pragma clang diagnostic ignored "-Wshadow"
24 29
25 namespace { 30 namespace {
26 char hexdigit(unsigned X) { return X < 10 ? '0' + X : 'A' + X - 10; } 31 char hexdigit(unsigned X) { return X < 10 ? '0' + X : 'A' + X - 10; }
27 32
28 void dumpLinkage(Ice::Ostream &Stream, 33 void dumpLinkage(Ice::Ostream &Stream,
29 llvm::GlobalValue::LinkageTypes Linkage) { 34 llvm::GlobalValue::LinkageTypes Linkage) {
30 if (!Ice::BuildDefs::dump()) 35 if (!Ice::BuildDefs::dump())
31 return; 36 return;
32 switch (Linkage) { 37 switch (Linkage) {
33 case llvm::GlobalValue::ExternalLinkage: 38 case llvm::GlobalValue::ExternalLinkage:
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 dumpType(Stream); 202 dumpType(Stream);
198 Stream << ")"; 203 Stream << ")";
199 if (Offset != 0) { 204 if (Offset != 0) {
200 Stream << ", "; 205 Stream << ", ";
201 dumpType(Stream); 206 dumpType(Stream);
202 Stream << " " << Offset << ")"; 207 Stream << " " << Offset << ")";
203 } 208 }
204 } 209 }
205 210
206 } // end of namespace Ice 211 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698