OLD | NEW |
1 //===- subzero/src/IceGlobalInits.h - Global declarations -------*- C++ -*-===// | 1 //===- subzero/src/IceGlobalInits.h - Global declarations -------*- C++ -*-===// |
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 declares the representation of function declarations, | 10 // This file declares the representation of function declarations, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 if (!ALLOW_DUMP) | 65 if (!ALLOW_DUMP) |
66 return; | 66 return; |
67 GlobalContext *const Ctx = nullptr; | 67 GlobalContext *const Ctx = nullptr; |
68 dump(Ctx, Stream); | 68 dump(Ctx, Stream); |
69 } | 69 } |
70 | 70 |
71 /// Returns true if when emitting names, we should suppress mangling. | 71 /// Returns true if when emitting names, we should suppress mangling. |
72 virtual bool getSuppressMangling() const = 0; | 72 virtual bool getSuppressMangling() const = 0; |
73 | 73 |
74 // Mangles name for cross tests, unless external and not defined locally | 74 // Mangles name for cross tests, unless external and not defined locally |
75 // (so that relocations accross llvm2ice and pnacl-llc will work). | 75 // (so that relocations accross pnacl-sz and pnacl-llc will work). |
76 virtual IceString mangleName(GlobalContext *Ctx) const { | 76 virtual IceString mangleName(GlobalContext *Ctx) const { |
77 return getSuppressMangling() ? Name : Ctx->mangleName(Name); | 77 return getSuppressMangling() ? Name : Ctx->mangleName(Name); |
78 } | 78 } |
79 | 79 |
80 protected: | 80 protected: |
81 GlobalDeclaration(GlobalDeclarationKind Kind, | 81 GlobalDeclaration(GlobalDeclarationKind Kind, |
82 llvm::GlobalValue::LinkageTypes Linkage) | 82 llvm::GlobalValue::LinkageTypes Linkage) |
83 : Kind(Kind), Linkage(Linkage) {} | 83 : Kind(Kind), Linkage(Linkage) {} |
84 | 84 |
85 const GlobalDeclarationKind Kind; | 85 const GlobalDeclarationKind Kind; |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 template <class StreamType> | 313 template <class StreamType> |
314 inline StreamType &operator<<(StreamType &Stream, | 314 inline StreamType &operator<<(StreamType &Stream, |
315 const GlobalDeclaration &Addr) { | 315 const GlobalDeclaration &Addr) { |
316 Addr.dump(Stream); | 316 Addr.dump(Stream); |
317 return Stream; | 317 return Stream; |
318 } | 318 } |
319 | 319 |
320 } // end of namespace Ice | 320 } // end of namespace Ice |
321 | 321 |
322 #endif // SUBZERO_SRC_ICEGLOBALINITS_H | 322 #endif // SUBZERO_SRC_ICEGLOBALINITS_H |
OLD | NEW |