[PATCH] D48750: Use PointerIntPair in llvm::Error instead of hand-rolling it

Jordan Rose via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 3 17:02:18 PDT 2018


jordan_rose added inline comments.


================
Comment at: include/llvm/Support/Error.h:290-292
+#if LLVM_ENABLE_ABI_BREAKING_CHECKS
+    Payload.setInt(!V);
+#endif
----------------
lhames wrote:
> Where does the stray 'setChecked(false)' happen?
> 
> I think I took the guards off this to make sure that Errors generated and checked in release mode code would not appear as "unchecked" to an app built in debug mode.
> 
> Sounds like you are hitting the opposite issue?
Oh, this wasn't actually necessary; it was just in case someone actually did use `setChecked(false)`. Since `getPtr` unconditionally does the masking, you'd never actually be able to tell anyway, so I figured it was better to have it optimize away. I'm happy to put it back.


Repository:
  rL LLVM

https://reviews.llvm.org/D48750





More information about the llvm-commits mailing list