This is an archive of the discontinued LLVM Phabricator instance.

Logically Dead Code
Needs ReviewPublic

Authored by chakshugrover on Aug 13 2015, 8:56 AM.

Details

Reviewers
rsmith
Summary

Removed Logically Dead Code

3249	  if (ForClass)
3250	    return llvm::Constant::getNullValue(ObjCTypes.IvarListPtrTy);

As we have already handled the case for ForClass being non-zero. So now further we take the false branch and the value of ForClass is equal to 0. So there's no need for additionally checking it again, making this code logically dead

3280	  if (ForClass)
3281	    GV =
3282	        CreateMetadataVar("OBJC_CLASS_VARIABLES_" + ID->getName(), Init,
3283	                          "__OBJC,__class_vars,regular,no_dead_strip", 4, true);
3284	  else

Diff Detail

Event Timeline

chakshugrover retitled this revision from to Logically Dead Code.
chakshugrover updated this object.
chakshugrover added a subscriber: llvm-commits.
vsk added a subscriber: vsk.Aug 22 2015, 7:29 PM

Thanks for the catch. LGTM.