[PATCH] D37597: [ubsan] Function Sanitizer: Don't require writable text segments

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 17:06:19 PDT 2017


vsk marked 4 inline comments as done.
vsk added inline comments.


================
Comment at: lib/CodeGen/CodeGenFunction.cpp:461
+                         ? EncodedAddr
+                         : Builder.CreateSExt(EncodedAddr, IntPtrTy);
+  auto *FuncAsInt = Builder.CreatePtrToInt(F, IntPtrTy, "func_addr.int");
----------------
pcc wrote:
> Is this conditional necessary? I believe that `IRBuilder` will return the same value back if you cast to the same type.
Thanks, it's not needed. I've gotten rid of it.


Repository:
  rL LLVM

https://reviews.llvm.org/D37597





More information about the cfe-commits mailing list