@@ -133,8 +133,7 @@ static void updateARMVFPArgs(Ctx &ctx, const ARMAttributeParser &attributes,
133133 // Object compatible with all conventions.
134134 return ;
135135 default :
136- ErrAlways (ctx) << f
137- << " : unknown Tag_ABI_VFP_args value: " << Twine (vfpArgs);
136+ ErrAlways (ctx) << f << " : unknown Tag_ABI_VFP_args value: " << vfpArgs;
138137 return ;
139138 }
140139 // Follow ld.bfd and error if there is a mix of calling conventions.
@@ -691,8 +690,7 @@ template <class ELFT> void ObjFile<ELFT>::parse(bool ignoreComdats) {
691690 // Otherwise, discard group members.
692691 for (uint32_t secIndex : entries.slice (1 )) {
693692 if (secIndex >= size)
694- Fatal (ctx) << this
695- << " : invalid section index in group: " << Twine (secIndex);
693+ Fatal (ctx) << this << " : invalid section index in group: " << secIndex;
696694 this ->sections [secIndex] = &InputSection::discarded;
697695 }
698696 }
@@ -748,8 +746,8 @@ bool ObjFile<ELFT>::shouldMerge(const Elf_Shdr &sec, StringRef name) {
748746 return false ;
749747 if (sec.sh_size % entSize)
750748 Fatal (ctx) << this << " :(" << name << " ): SHF_MERGE section size ("
751- << Twine (sec.sh_size ) << " ) must be a multiple of sh_entsize ( "
752- << Twine ( entSize) << " )" ;
749+ << uint64_t (sec.sh_size )
750+ << " ) must be a multiple of sh_entsize ( " << entSize << " )" ;
753751
754752 if (sec.sh_flags & SHF_WRITE)
755753 Fatal (ctx) << this << " :(" << name
@@ -810,7 +808,7 @@ void ObjFile<ELFT>::initializeSections(bool ignoreComdats,
810808 Warn (ctx) << this
811809 << " : --icf=safe conservatively ignores "
812810 " SHT_LLVM_ADDRSIG [index "
813- << Twine (i)
811+ << i
814812 << " ] with sh_link=0 "
815813 " (likely created using objcopy or ld -r)" ;
816814 }
@@ -939,7 +937,8 @@ void ObjFile<ELFT>::initializeSections(bool ignoreComdats,
939937 if (sec.sh_link < size)
940938 linkSec = this ->sections [sec.sh_link ];
941939 if (!linkSec)
942- Fatal (ctx) << this << " : invalid sh_link index: " << Twine (sec.sh_link );
940+ Fatal (ctx) << this
941+ << " : invalid sh_link index: " << uint32_t (sec.sh_link );
943942
944943 // A SHF_LINK_ORDER section is discarded if its linked-to section is
945944 // discarded.
@@ -1167,7 +1166,7 @@ void ObjFile<ELFT>::initializeSymbols(const object::ELFFile<ELFT> &obj) {
11671166 if (LLVM_UNLIKELY (eSym.st_shndx == SHN_COMMON)) {
11681167 if (value == 0 || value >= UINT32_MAX)
11691168 Fatal (ctx) << this << " : common symbol '" << sym->getName ()
1170- << " ' has invalid alignment: " << Twine ( value) ;
1169+ << " ' has invalid alignment: " << value;
11711170 hasCommonSyms = true ;
11721171 sym->resolve (ctx, CommonSymbol{ctx, this , StringRef (), binding, stOther,
11731172 type, value, size});
@@ -1214,7 +1213,7 @@ void ObjFile<ELFT>::initSectionsAndLocalSyms(bool ignoreComdats) {
12141213 else if (secIdx >= SHN_LORESERVE)
12151214 secIdx = 0 ;
12161215 if (LLVM_UNLIKELY (secIdx >= sections.size ()))
1217- Fatal (ctx) << this << " : invalid section index: " << Twine ( secIdx) ;
1216+ Fatal (ctx) << this << " : invalid section index: " << secIdx;
12181217 if (LLVM_UNLIKELY (eSym.getBinding () != STB_LOCAL))
12191218 ErrAlways (ctx) << this << " : non-local symbol (" << i
12201219 << " ) found at index < .symtab's sh_info (" << end << " )" ;
@@ -1274,7 +1273,7 @@ template <class ELFT> void ObjFile<ELFT>::postParse() {
12741273 else if (secIdx >= SHN_LORESERVE)
12751274 secIdx = 0 ;
12761275 if (LLVM_UNLIKELY (secIdx >= sections.size ()))
1277- Fatal (ctx) << this << " : invalid section index: " << Twine ( secIdx) ;
1276+ Fatal (ctx) << this << " : invalid section index: " << secIdx;
12781277 InputSectionBase *sec = sections[secIdx];
12791278 if (sec == &InputSection::discarded) {
12801279 if (sym.traced ) {
@@ -1577,8 +1576,8 @@ template <class ELFT> void SharedFile::parse() {
15771576 // as of binutils 2.34, GNU ld produces VER_NDX_LOCAL.
15781577 if (ver != VER_NDX_LOCAL && ver != VER_NDX_GLOBAL) {
15791578 if (idx >= verneeds.size ()) {
1580- ErrAlways (ctx) << " corrupt input file: version need index "
1581- << Twine (idx) << " for symbol " << name
1579+ ErrAlways (ctx) << " corrupt input file: version need index " << idx
1580+ << " for symbol " << name
15821581 << " is out of bounds\n >>> defined in " << this ;
15831582 continue ;
15841583 }
@@ -1602,8 +1601,8 @@ template <class ELFT> void SharedFile::parse() {
16021601 // VER_NDX_LOCAL. Workaround this bug.
16031602 if (ctx.arg .emachine == EM_MIPS && name == " _gp_disp" )
16041603 continue ;
1605- ErrAlways (ctx) << " corrupt input file: version definition index "
1606- << Twine (idx) << " for symbol " << name
1604+ ErrAlways (ctx) << " corrupt input file: version definition index " << idx
1605+ << " for symbol " << name
16071606 << " is out of bounds\n >>> defined in " << this ;
16081607 continue ;
16091608 }
0 commit comments