diff --git a/llvm/tools/llvm-readobj/XCOFFDumper.cpp b/llvm/tools/llvm-readobj/XCOFFDumper.cpp index 3e47ceb9ee738..85c3a251b6b70 100644 --- a/llvm/tools/llvm-readobj/XCOFFDumper.cpp +++ b/llvm/tools/llvm-readobj/XCOFFDumper.cpp @@ -460,7 +460,7 @@ void XCOFFDumper::printSymbols() { void XCOFFDumper::printStringTable() { DictScope DS(W, "StringTable"); StringRef StrTable = Obj.getStringTable(); - size_t StrTabSize = StrTable.size(); + uint32_t StrTabSize = StrTable.size(); W.printNumber("Length", StrTabSize); // Print strings from the fifth byte, since the first four bytes contain the // length (in bytes) of the string table (including the length field).