mirror of
https://github.com/nasa/trick.git
synced 2025-04-07 19:34:23 +00:00
ICG creates offsetof statements that will not compile when using clang #327
When copying inherited variables to a child class in ICG, the inherited flags were not being set on the mac.
This commit is contained in:
parent
f1cbacd646
commit
a2452aacd0
@ -57,6 +57,16 @@ void ClassValues::addInheritedFieldDescriptions(std::vector<FieldDescription *>
|
||||
|
||||
std::vector<FieldDescription *>::iterator fdit ;
|
||||
// Loop through the incoming inherited variable names
|
||||
for ( fdit = in_fdes.begin() ; fdit != in_fdes.end() ; fdit++ ) {
|
||||
|
||||
(*fdit)->setBaseClassOffset( class_offset ) ;
|
||||
(*fdit)->setInherited( true ) ;
|
||||
(*fdit)->setVirtualInherited( virtual_inherited ) ;
|
||||
// Adds the class offset to the field offset giving the total offset to the inherited variable
|
||||
// The offset is stored in bits so multiply class_offset by 8.
|
||||
(*fdit)->addOffset( class_offset * 8 ) ;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
if ( !global_compat15 and !compat15 ) {
|
||||
#else
|
||||
@ -64,13 +74,6 @@ void ClassValues::addInheritedFieldDescriptions(std::vector<FieldDescription *>
|
||||
#endif
|
||||
for ( fdit = in_fdes.begin() ; fdit != in_fdes.end() ; fdit++ ) {
|
||||
|
||||
(*fdit)->setBaseClassOffset( class_offset ) ;
|
||||
(*fdit)->setInherited( true ) ;
|
||||
(*fdit)->setVirtualInherited( virtual_inherited ) ;
|
||||
// Adds the class offset to the field offset giving the total offset to the inherited variable
|
||||
// The offset is stored in bits so multiply class_offset by 8.
|
||||
(*fdit)->addOffset( class_offset * 8 ) ;
|
||||
|
||||
std::string in_name = (*fdit)->getName() ;
|
||||
// search existing names for incoming inherited variable name.
|
||||
std::map< std::string , FieldDescription * >::iterator mit = field_name_to_info_map.find(in_name) ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user