Changes in src/InitTweak/InitTweak.cpp [13481af0:ef05cf0]
- File:
-
- 1 edited
-
src/InitTweak/InitTweak.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cpp
r13481af0 ref05cf0 9 9 // Author : Rob Schluntz 10 10 // Created On : Fri May 13 11:26:36 2016 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Jul 2 16:47:11 202613 // Update Count : 4411 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Sep 22 9:50:00 2022 13 // Update Count : 21 14 14 // 15 15 … … 428 428 } 429 429 430 #if defined( __x86_64 ) || defined( __i386 ) // assembler comment to prevent assembler warning message 431 #define ASM_COMMENT "#" 432 #else // defined( __ARM_ARCH ) 433 #define ASM_COMMENT "//" 434 #endif 435 static const char * const data_section = ".data" ASM_COMMENT; 436 static const char * const tlsd_section = ".tdata" ASM_COMMENT; 437 438 void addDataSectionAttribute( ast::ObjectDecl * objDecl ) { 439 const bool is_tls = objDecl->storage.is_threadlocal_any(); 440 const char * section = is_tls ? tlsd_section : data_section; 441 objDecl->attributes.push_back(new ast::Attribute("section", { 442 ast::ConstantExpr::from_string(objDecl->location, section) 443 })); 444 } 445 430 446 InitExpander::InitExpander( const ast::Init * init ) 431 447 : expander( new InitImpl{ init } ), crnt(), indices() {}
Note:
See TracChangeset
for help on using the changeset viewer.