| OLD | NEW |
| 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 /// \file | 10 /// \file |
| 11 /// This file implements the notion of function declarations, global | 11 /// This file implements the notion of function declarations, global |
| 12 /// variable declarations, and the corresponding variable initializers | 12 /// variable declarations, and the corresponding variable initializers |
| 13 /// in Subzero. | 13 /// in Subzero. |
| 14 /// | 14 /// |
| 15 //===----------------------------------------------------------------------===// | 15 //===----------------------------------------------------------------------===// |
| 16 | 16 |
| 17 #include "IceGlobalInits.h" | 17 #include "IceGlobalInits.h" |
| 18 | 18 |
| 19 #include "IceDefs.h" | 19 #include "IceDefs.h" |
| 20 #include "IceGlobalContext.h" | 20 #include "IceGlobalContext.h" |
| 21 #include "IceTypes.h" | 21 #include "IceTypes.h" |
| 22 |
| 23 #pragma clang diagnostic push |
| 24 #pragma clang diagnostic ignored "-Wunused-parameter" |
| 25 #pragma clang diagnostic ignored "-Wshadow" |
| 22 #include "llvm/ADT/STLExtras.h" | 26 #include "llvm/ADT/STLExtras.h" |
| 23 #include "llvm/IR/Function.h" | 27 #include "llvm/IR/Function.h" |
| 24 #include "llvm/IR/Value.h" | 28 #include "llvm/IR/Value.h" |
| 29 #pragma clang diagnostic ignored "-Wshadow" |
| 25 | 30 |
| 26 namespace { | 31 namespace { |
| 27 char hexdigit(unsigned X) { return X < 10 ? '0' + X : 'A' + X - 10; } | 32 char hexdigit(unsigned X) { return X < 10 ? '0' + X : 'A' + X - 10; } |
| 28 | 33 |
| 29 void dumpLinkage(Ice::Ostream &Stream, | 34 void dumpLinkage(Ice::Ostream &Stream, |
| 30 llvm::GlobalValue::LinkageTypes Linkage) { | 35 llvm::GlobalValue::LinkageTypes Linkage) { |
| 31 if (!Ice::BuildDefs::dump()) | 36 if (!Ice::BuildDefs::dump()) |
| 32 return; | 37 return; |
| 33 switch (Linkage) { | 38 switch (Linkage) { |
| 34 case llvm::GlobalValue::ExternalLinkage: | 39 case llvm::GlobalValue::ExternalLinkage: |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 dumpType(Stream); | 203 dumpType(Stream); |
| 199 Stream << ")"; | 204 Stream << ")"; |
| 200 if (Offset != 0) { | 205 if (Offset != 0) { |
| 201 Stream << ", "; | 206 Stream << ", "; |
| 202 dumpType(Stream); | 207 dumpType(Stream); |
| 203 Stream << " " << Offset << ")"; | 208 Stream << " " << Offset << ")"; |
| 204 } | 209 } |
| 205 } | 210 } |
| 206 | 211 |
| 207 } // end of namespace Ice | 212 } // end of namespace Ice |
| OLD | NEW |