summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2017-06-30 16:05:40 +0000
committerKostya Kortchinsky <kostyak@google.com>2017-06-30 16:05:40 +0000
commitb138ab810fce4975071fcd5455a960d9f2a074aa (patch)
tree8640f5f2a99aadfa5964ce94d907c0199a3f5f38 /clang/lib/CodeGen/CGObjCMac.cpp
parente9db96e6d9eb2fd03d35d884e53998861b80a178 (diff)
downloadbcm5719-llvm-b138ab810fce4975071fcd5455a960d9f2a074aa.tar.gz
bcm5719-llvm-b138ab810fce4975071fcd5455a960d9f2a074aa.zip
[sanitizer] Small tweaks and fixes to allocator related functions
Summary: In `sanitizer_allocator_primary32.h`: - rounding up in `MapWithCallback` is not needed as `MmapOrDie` does it. Note that the 64-bit counterpart doesn't round up, this keeps the behavior consistent; - since `IsAligned` exists, use it in `AllocateRegion`; - in `PopulateFreeList`: - checking `b->Count` to be greater than 0 when `b->Count() == max_count` is redundant when done more than once. Just check that `max_count` is greater than 0 out of the loop; the compiler (at least on ARM) didn't optimize it; - mark the batch creation failure as `UNLIKELY`; In `sanitizer_allocator_primary64.h`: - in `MapWithCallback`, mark the failure condition as `UNLIKELY`; In `sanitizer_posix.h`: - mark a bunch of Mmap related failure conditions as `UNLIKELY`; - in `MmapAlignedOrDieOnFatalError`, we have `IsAligned`, so use it; rearrange the conditions as one test was redudant; - in `MmapFixedImpl`, 30 chars was not large enough to hold the message and a full 64-bit address (or at least a 48-bit usermode address), increase to 40. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: aemerson, kubamracek, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D34840 llvm-svn: 306834
Diffstat (limited to 'clang/lib/CodeGen/CGObjCMac.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud