[PATCH] D25134: Rename StringSwitch::Cases StringSwitch::Case.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 30 15:00:18 PDT 2016


ruiu created this revision.
ruiu added a reviewer: zturner.
ruiu added a subscriber: llvm-commits.
Herald added a reviewer: tstellarAMD.
Herald added subscribers: nhaehnle, arsenm.

When you add a condition to a StringSwitch::Case, you also have
to change the function to call Cases instead of Case. Not a big deal
but it's always slightly annoying.

This patch renames Cases Case so that we have single overloaded
function

  Cases(<one or more strings>, <result>)

instead of two functions

  Case(<string>, <result>) and
  Cases(<two or more strings>, <result>)

I'll delete Cases after updating LLVM subproject's source.


https://reviews.llvm.org/D25134

Files:
  include/llvm/ADT/StringSwitch.h
  lib/MC/MCParser/ELFAsmParser.cpp
  lib/Support/TargetParser.cpp
  lib/Support/Triple.cpp
  lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
  lib/Target/X86/AsmParser/X86AsmParser.cpp
  tools/llvm-cov/llvm-cov.cpp
  utils/TableGen/FastISelEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25134.73152.patch
Type: text/x-patch
Size: 13279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160930/2378ea7c/attachment.bin>


More information about the llvm-commits mailing list