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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 static bool classof(const GlobalDeclaration *Addr) { | 284 static bool classof(const GlobalDeclaration *Addr) { |
285 return Addr->getKind() == VariableDeclarationKind; | 285 return Addr->getKind() == VariableDeclarationKind; |
286 } | 286 } |
287 | 287 |
288 bool getSuppressMangling() const final { | 288 bool getSuppressMangling() const final { |
289 if (ForceSuppressMangling) | 289 if (ForceSuppressMangling) |
290 return true; | 290 return true; |
291 return isExternal() && !hasInitializer(); | 291 return isExternal() && !hasInitializer(); |
292 } | 292 } |
293 | 293 |
294 void setSuppressMangling() { | 294 void setSuppressMangling() { ForceSuppressMangling = true; } |
295 ForceSuppressMangling = true; | |
296 } | |
297 | 295 |
298 private: | 296 private: |
299 // list of initializers for the declared variable. | 297 // list of initializers for the declared variable. |
300 InitializerListType Initializers; | 298 InitializerListType Initializers; |
301 // The alignment of the declared variable. | 299 // The alignment of the declared variable. |
302 uint32_t Alignment; | 300 uint32_t Alignment; |
303 // True if a declared (global) constant. | 301 // True if a declared (global) constant. |
304 bool IsConstant; | 302 bool IsConstant; |
305 // If set to true, force getSuppressMangling() to return true. | 303 // If set to true, force getSuppressMangling() to return true. |
306 bool ForceSuppressMangling; | 304 bool ForceSuppressMangling; |
(...skipping 14 matching lines...) Expand all Loading... |
321 template <class StreamType> | 319 template <class StreamType> |
322 inline StreamType &operator<<(StreamType &Stream, | 320 inline StreamType &operator<<(StreamType &Stream, |
323 const GlobalDeclaration &Addr) { | 321 const GlobalDeclaration &Addr) { |
324 Addr.dump(Stream); | 322 Addr.dump(Stream); |
325 return Stream; | 323 return Stream; |
326 } | 324 } |
327 | 325 |
328 } // end of namespace Ice | 326 } // end of namespace Ice |
329 | 327 |
330 #endif // SUBZERO_SRC_ICEGLOBALINITS_H | 328 #endif // SUBZERO_SRC_ICEGLOBALINITS_H |
OLD | NEW |