diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp index 7f38a021a0a..ecc7527cb7e 100644 --- a/tools/gold/gold-plugin.cpp +++ b/tools/gold/gold-plugin.cpp @@ -626,7 +626,8 @@ static void addModule(LTO &Lto, claimed_file &F, const void *View) { CommonRes.Prevailing = true; CommonRes.VisibleToRegularObj = R.VisibleToRegularObj; } - CommonRes.Size = std::max(CommonRes.Size, ObjSym.getCommonSize()); + CommonRes.Size = std::max(CommonRes.Size, + static_cast(ObjSym.getCommonSize())); CommonRes.Align = std::max(CommonRes.Align, ObjSym.getCommonAlignment()); R.Prevailing = false; }