This is an archive of the discontinued LLVM Phabricator instance.

Fix no-assert ununsed variable.
ClosedPublic

Authored by rdhindsa on Dec 11 2019, 9:43 AM.

Details

Summary

These variables are unused in the no-assert build.

Diff Detail

Event Timeline

rdhindsa created this revision.Dec 11 2019, 9:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 11 2019, 9:43 AM

This fixes -Wunused-variable warnings in -DLLVM_ENABLE_ASSERTIONS=off builds. This can be submitted without review.

I think if you mention the original differential (Dxxxxx), the author may be notified when you push the commit. The Phabricator UI will also connect your commit with the original differential.

fhahn accepted this revision.Dec 11 2019, 10:11 AM
fhahn added a subscriber: fhahn.

LGTM thanks, in case you are waiting for approval in Phabricator. But as mentioned earlier, there's no need for patches like this to go through review.

llvm/lib/Analysis/LoopInfo.cpp
369

FWIW if Latch is not used elsewhere, it would be easier to just call getLoopLatch in the assert, rather than adding an unused variable to the scope.

This revision is now accepted and ready to land.Dec 11 2019, 10:11 AM
MaskRay closed this revision.Dec 11 2019, 11:11 AM

@rdhindsa is waiting for the git commit permission. In the meantime, rG25e21a09b3f6 was committed to fix the -Wunused-variable problems.