[lld] 627f55b - Fix format specifier. NFCI.

Jorge Gorbe Moya via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 15:27:32 PDT 2022


Author: Jorge Gorbe Moya
Date: 2022-04-07T15:26:49-07:00
New Revision: 627f55b3ae7e1e8e0365c4730057e6b9acb13004

URL: https://github.com/llvm/llvm-project/commit/627f55b3ae7e1e8e0365c4730057e6b9acb13004
DIFF: https://github.com/llvm/llvm-project/commit/627f55b3ae7e1e8e0365c4730057e6b9acb13004.diff

LOG: Fix format specifier. NFCI.

Using a portable format specifier avoids a "format specifies type
'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned
long') [-Werror,-Wformat]" error depending on the exact definition of
`uint64_t`.

Added: 
    

Modified: 
    lld/MachO/ConcatOutputSection.cpp

Removed: 
    


################################################################################
diff  --git a/lld/MachO/ConcatOutputSection.cpp b/lld/MachO/ConcatOutputSection.cpp
index 28f31ee7e07ca..5b2ea44243280 100644
--- a/lld/MachO/ConcatOutputSection.cpp
+++ b/lld/MachO/ConcatOutputSection.cpp
@@ -343,7 +343,7 @@ void TextOutputSection::finalize() {
       thunkInfo.sym->used = true;
       target->populateThunk(thunkInfo.isec, funcSym);
       finalizeOne(thunkInfo.isec);
-      fprintf(stderr, "%llx\n", thunkInfo.isec->outSecOff);
+      fprintf(stderr, "%" PRIx64 "\n", thunkInfo.isec->outSecOff);
       thunks.push_back(thunkInfo.isec);
       ++thunkCount;
     }


        


More information about the llvm-commits mailing list