[llvm-commits] Fix for unused variable warning in MSVC due to use only within an assert

David Blaikie dblaikie at gmail.com
Sat Sep 24 20:13:19 PDT 2011


In the attached diff the old (removed) 'F' variable was only used within the
following assert & thus would warn in retail builds.

Rather than simply (void)F-ing out the expression it seemed tidier to
simplify this whole section of code. The asserts could be avoided/simplified
by using cast instead of dyn_cast (since cast includes the same assert).
Hopefully this is an acceptable fix.

- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110924/12294f07/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unused_variable.diff
Type: text/x-patch
Size: 1365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110924/12294f07/attachment.bin>


More information about the llvm-commits mailing list