36 /// The ArchiveMemberHeader structure is used internally for bitcode 37 /// archives. 38 /// The header precedes each file member in the archive. This structure is 39 /// defined using character arrays for direct and correct interpretation 40 /// regardless of the endianess of the machine that produced it. 41 /// @brief Archive File Member Header 42 class ArchiveMemberHeader { 43 /// @name Data 44 /// @{ 45 public: 46 char name[16]; ///< Name of the file member. 47 char date[12]; ///< File date, decimal seconds since Epoch 48 char uid[6]; ///< user id in ASCII decimal 49 char gid[6]; ///< group id in ASCII decimal 50 char mode[8]; ///< file mode in ASCII octal 51 char size[10]; ///< file size in ASCII decimal 52 char fmag[2]; ///< Always contains ARFILE_MAGIC_TERMINATOR 53 54 /// @} 55 /// @name Methods 56 /// @{ 57 public: 58 void init() { 59 memset(name,' ',16); 60 memset(date,' ',12); 61 memset(uid,' ',6); 62 memset(gid,' ',6); 63 memset(mode,' ',8); 64 memset(size,' ',10); 65 fmag[0] = '`'; 66 fmag[1] = '\n'; 67 } 68 69 bool checkSignature() { 70 return 0 == memcmp(fmag, ARFILE_MEMBER_MAGIC,2); 71 } 72 }; 73 74 // Get just the externally visible defined symbols from the bitcode 75 bool GetBitcodeSymbols(const sys::Path& fName,
|