[PATCH] Call attention to strange case in getMultiarchTriple, and DRY so much.

Douglas Katzman dougk at google.com
Mon Jun 22 09:32:38 PDT 2015


Hi wschmidt, chandlerc,

There is a suspicious fallthrough at ppc64 which on first glance seems unlikely to be right, but also seems unlikely to cause a problem, and remains as-is but with a comment. It seems like it should have resembled the pattern of the cases above it:
 `if (test) return "/some/path"; return TargetTriple.str();`
whereas it actually fell into the ppc64le case.
I am not sure what the intent was, so this patch adds an explicit "// Fallthrough" comment.

Additionally there is a uniform catch-all case at the end rather than having every architecture recognize both a special case (or two) and the general case.

http://reviews.llvm.org/D10605

Files:
  lib/Driver/ToolChains.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10605.28121.patch
Type: text/x-patch
Size: 4783 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150622/6af9534b/attachment.bin>


More information about the cfe-commits mailing list