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

Unified Diff: src/gdb-jit.cc

Issue 1237753004: Add -Wshorten-64-to-32 flag to mac builds. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix nit, clang formatted. Created 5 years, 5 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 | « src/base/platform/time.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gdb-jit.cc
diff --git a/src/gdb-jit.cc b/src/gdb-jit.cc
index 2746806e925fe3d1acd65daf97092a4513be9846..57b581143264693e882c29e5ed51c5efc41c3ce6 100644
--- a/src/gdb-jit.cc
+++ b/src/gdb-jit.cc
@@ -355,17 +355,13 @@ class ELFSection : public DebugSectionBase<ELFSectionHeader> {
#if defined(__MACH_O)
class MachOTextSection : public MachOSection {
public:
- MachOTextSection(uintptr_t align,
- uintptr_t addr,
- uintptr_t size)
- : MachOSection("__text",
- "__TEXT",
- align,
+ MachOTextSection(uint32_t align, uintptr_t addr, uintptr_t size)
+ : MachOSection("__text", "__TEXT", align,
MachOSection::S_REGULAR |
MachOSection::S_ATTR_SOME_INSTRUCTIONS |
MachOSection::S_ATTR_PURE_INSTRUCTIONS),
addr_(addr),
- size_(size) { }
+ size_(size) {}
protected:
virtual void PopulateHeader(Writer::Slot<Header> header) {
@@ -588,7 +584,8 @@ class MachO BASE_EMBEDDED {
Writer::Slot<MachOSection::Header> headers =
w->CreateSlotsHere<MachOSection::Header>(sections_.length());
cmd->fileoff = w->position();
- header->sizeofcmds = w->position() - load_command_start;
+ header->sizeofcmds =
+ static_cast<uint32_t>(w->position() - load_command_start);
for (int section = 0; section < sections_.length(); ++section) {
sections_[section]->PopulateHeader(headers.at(section));
sections_[section]->WriteBody(headers.at(section), w);
« no previous file with comments | « src/base/platform/time.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698