1//===--- TargetInfo.cpp - Information about Target machine ----------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 641 unchanged lines hidden (view full) --- 650 651bool TargetCXXABI::tryParse(llvm::StringRef name) { 652 const Kind unknown = static_cast<Kind>(-1); 653 Kind kind = llvm::StringSwitch<Kind>(name) 654 .Case("arm", GenericARM) 655 .Case("ios", iOS) 656 .Case("itanium", GenericItanium) 657 .Case("microsoft", Microsoft) |
658 .Case("mips", GenericMIPS) |
659 .Default(unknown); 660 if (kind == unknown) return false; 661 662 set(kind); 663 return true; 664} |