Created
September 13, 2018 13:41
-
-
Save lirenlin/9a4ae364bb19132a553559dfa122df33 to your computer and use it in GitHub Desktop.
llvm StringSwitch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Color color = StringSwitch<Color>(argv[i]) | |
| .Case("red", Red) | |
| .Case("orange", Orange) | |
| .Case("yellow", Yellow) | |
| .Case("green", Green) | |
| .Case("blue", Blue) | |
| .Case("indigo", Indigo) | |
| .Cases("violet", "purple", Violet) | |
| .Default(UnknownColor); | |
| https://groups.google.com/forum/#!topic/llvm-dev/nFRdNtIzCgI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment