[PATCH] D18438: Calculate __builtin_object_size when pointer depends on a condition

George Burgess IV via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 8 10:42:57 PDT 2016


george.burgess.iv accepted this revision.
george.burgess.iv added a comment.
This revision is now accepted and ready to land.

This LGTM with two more comments. Thanks so much for the patch! :)


================
Comment at: include/llvm/Analysis/MemoryBuiltins.h:146
@@ -137,1 +145,3 @@
 
+APInt getSizeWithOverflow(const SizeOffsetType &Data);
+
----------------
This has no users outside of MemoryBuiltins.cpp, so we can remove this.

================
Comment at: lib/Analysis/MemoryBuiltins.cpp:367
@@ -369,1 +366,3 @@
 
+APInt llvm::getSizeWithOverflow(const SizeOffsetType &Data) {
+  if (Data.second.isNegative() || Data.first.ult(Data.second))
----------------
Please make this `static APInt getSizeWithOverflow(const SizeOffsetType &Data) {`, and move it above `llvm::getObjectSize` (so `llvm::getObjectSize` can use it :) ).


Repository:
  rL LLVM

http://reviews.llvm.org/D18438





More information about the llvm-commits mailing list