@@ -296,7 +296,6 @@ class XCOFFObjectWriter : public MCObjectWriter {
296296 uint64_t SymbolTableOffset = 0 ;
297297 uint16_t SectionCount = 0 ;
298298 uint32_t PaddingsBeforeDwarf = 0 ;
299- std::vector<std::pair<std::string, size_t >> FileNames;
300299 bool HasVisibility = false ;
301300
302301 support::endian::Writer W;
@@ -638,7 +637,6 @@ void XCOFFObjectWriter::executePostLayoutBinding(MCAssembler &Asm) {
638637 if (CISI && nameShouldBeInStringTable (CISI->Name ))
639638 Strings.add (CISI->Name );
640639
641- FileNames = Asm.getFileNames ();
642640 // Emit ".file" as the source file name when there is no file name.
643641 if (FileNames.empty ())
644642 FileNames.emplace_back (" .file" , 0 );
@@ -651,7 +649,7 @@ void XCOFFObjectWriter::executePostLayoutBinding(MCAssembler &Asm) {
651649 // the AUX_FILE auxiliary entry.
652650 if (nameShouldBeInStringTable (" .file" ))
653651 Strings.add (" .file" );
654- StringRef Vers = Asm. getCompilerVersion () ;
652+ StringRef Vers = CompilerVersion ;
655653 if (auxFileSymNameShouldBeInStringTable (Vers))
656654 Strings.add (Vers);
657655
@@ -1161,7 +1159,7 @@ void XCOFFObjectWriter::writeRelocations() {
11611159
11621160void XCOFFObjectWriter::writeSymbolTable (MCAssembler &Asm) {
11631161 // Write C_FILE symbols.
1164- StringRef Vers = Asm. getCompilerVersion () ;
1162+ StringRef Vers = CompilerVersion ;
11651163
11661164 for (const std::pair<std::string, size_t > &F : FileNames) {
11671165 // The n_name of a C_FILE symbol is the source file's name when no auxiliary
@@ -1417,7 +1415,7 @@ void XCOFFObjectWriter::assignAddressesAndIndices(MCAssembler &Asm) {
14171415 // The symbol table starts with all the C_FILE symbols. Each C_FILE symbol
14181416 // requires 1 or 2 auxiliary entries.
14191417 uint32_t SymbolTableIndex =
1420- (2 + (Asm. getCompilerVersion () .empty () ? 0 : 1 )) * FileNames.size ();
1418+ (2 + (CompilerVersion .empty () ? 0 : 1 )) * FileNames.size ();
14211419
14221420 if (CInfoSymSection.Entry )
14231421 SymbolTableIndex++;
0 commit comments