[compiler-rt] r283511 - [ubsan] More 0 -> nullptr conversions (NFC)
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 6 16:41:57 PDT 2016
Author: vedantk
Date: Thu Oct 6 18:41:57 2016
New Revision: 283511
URL: http://llvm.org/viewvc/llvm-project?rev=283511&view=rev
Log:
[ubsan] More 0 -> nullptr conversions (NFC)
Modified:
compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc
Modified: compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc?rev=283511&r1=283510&r2=283511&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc Thu Oct 6 18:41:57 2016
@@ -167,7 +167,7 @@ static const abi::__class_type_info *fin
dynamic_cast<const abi::__vmi_class_type_info*>(Derived);
if (!VTI)
// No base class subobjects.
- return 0;
+ return nullptr;
for (unsigned int base = 0; base != VTI->base_count; ++base) {
sptr OffsetHere = VTI->base_info[base].__offset_flags >>
@@ -182,7 +182,7 @@ static const abi::__class_type_info *fin
return Base;
}
- return 0;
+ return nullptr;
}
namespace {
@@ -198,11 +198,11 @@ struct VtablePrefix {
VtablePrefix *getVtablePrefix(void *Vtable) {
VtablePrefix *Vptr = reinterpret_cast<VtablePrefix*>(Vtable);
if (!Vptr)
- return 0;
+ return nullptr;
VtablePrefix *Prefix = Vptr - 1;
if (!Prefix->TypeInfo)
// This can't possibly be a valid vtable.
- return 0;
+ return nullptr;
return Prefix;
}
More information about the llvm-commits
mailing list