[compiler-rt] r320592 - [scudo] Inline getScudoChunk function.

Kostya Kortchinsky via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 08:10:39 PST 2017


Author: cryptoad
Date: Wed Dec 13 08:10:39 2017
New Revision: 320592

URL: http://llvm.org/viewvc/llvm-project?rev=320592&view=rev
Log:
[scudo] Inline getScudoChunk function.

Summary:
getScudoChunk function is implicitly inlined for optimized builds on
clang, but not on gcc. It's a small enough function that it seems
sensible enough to just inline it by default.

Reviewers: cryptoad, alekseyshl

Reviewed By: cryptoad

Differential Revision: https://reviews.llvm.org/D41138

Modified:
    compiler-rt/trunk/lib/scudo/scudo_allocator.cpp

Modified: compiler-rt/trunk/lib/scudo/scudo_allocator.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/scudo/scudo_allocator.cpp?rev=320592&r1=320591&r2=320592&view=diff
==============================================================================
--- compiler-rt/trunk/lib/scudo/scudo_allocator.cpp (original)
+++ compiler-rt/trunk/lib/scudo/scudo_allocator.cpp Wed Dec 13 08:10:39 2017
@@ -157,7 +157,7 @@ struct ScudoChunk : UnpackedHeader {
   }
 };
 
-ScudoChunk *getScudoChunk(uptr UserBeg) {
+INLINE ScudoChunk *getScudoChunk(uptr UserBeg) {
   return reinterpret_cast<ScudoChunk *>(UserBeg - AlignedChunkHeaderSize);
 }
 




More information about the llvm-commits mailing list