Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: src/IceELFObjectWriter.cpp

Issue 1825363003: Subzero. Fixes valgrind errors. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Make format Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceELFObjectWriter.cpp
diff --git a/src/IceELFObjectWriter.cpp b/src/IceELFObjectWriter.cpp
index 26e76f01cbac80960f8fcac0542773fd57ffa862..d92369fa7841494cd4f93b0198675b5e3f38b778 100644
--- a/src/IceELFObjectWriter.cpp
+++ b/src/IceELFObjectWriter.cpp
@@ -388,9 +388,9 @@ void ELFObjectWriter::writeDataOfType(SectionType ST,
// entry will be created separately.
if (!Var->hasInitializer())
continue;
- Elf64_Xword Align = Var->getAlignment();
constexpr Elf64_Xword MinAlign = 1;
- Align = std::max(Align, MinAlign);
+ const Elf64_Xword Align =
Jim Stichnoth 2016/03/23 21:08:22 Use auto here? given std::max<Elf64_Xword>
John 2016/03/24 13:02:26 auto everywhere!!!! :)
+ std::max<Elf64_Xword>(MinAlign, Var->getAlignment());
Section->padToAlignment(Str, Align);
SizeT SymbolSize = Var->getNumBytes();
bool IsExternal = Var->isExternal() || Ctx.getFlags().getDisableInternal();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698