]> granicus.if.org Git - clang/commitdiff
Remove dead code associated with parsing and setting ABI based on
authorEric Christopher <echristo@gmail.com>
Wed, 26 Aug 2015 07:01:33 +0000 (07:01 +0000)
committerEric Christopher <echristo@gmail.com>
Wed, 26 Aug 2015 07:01:33 +0000 (07:01 +0000)
string name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246021 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/TargetCXXABI.h
include/clang/Basic/TargetInfo.h
lib/Basic/TargetInfo.cpp

index 42a976b3afdeb420d92cd700c504cada36c3ce85..6921750b84ade5ed64b3f4f5d4e466ceb52b9812 100644 (file)
@@ -282,9 +282,6 @@ public:
     llvm_unreachable("bad ABI kind");
   }
 
-  /// Try to parse an ABI name, returning false on error.
-  bool tryParse(llvm::StringRef name);
-
   friend bool operator==(const TargetCXXABI &left, const TargetCXXABI &right) {
     return left.getKind() == right.getKind();
   }
index acb5f726eaf23bcb77933ae2794b7fd398b672ed..67d2fdf6f349ceeb545f224acc49fa6fda790f01 100644 (file)
@@ -772,23 +772,6 @@ public:
     return false;
   }
 
-  /// \brief Use this specified C++ ABI.
-  ///
-  /// \return False on error (invalid C++ ABI name).
-  bool setCXXABI(llvm::StringRef name) {
-    TargetCXXABI ABI;
-    if (!ABI.tryParse(name)) return false;
-    return setCXXABI(ABI);
-  }
-
-  /// \brief Set the C++ ABI to be used by this implementation.
-  ///
-  /// \return False on error (ABI not valid on this target)
-  virtual bool setCXXABI(TargetCXXABI ABI) {
-    TheCXXABI = ABI;
-    return true;
-  }
-
   /// \brief Enable or disable a specific target feature;
   /// the feature name must be valid.
   virtual void setFeatureEnabled(llvm::StringMap<bool> &Features,
index dcd003376b656a9179cc94d6a9c646fe8645eeb2..30378a5a751ee35bf7ee1601b2c44a7d24bb7dc0 100644 (file)
@@ -650,18 +650,3 @@ bool TargetInfo::validateInputConstraint(ConstraintInfo *OutputConstraints,
 
   return true;
 }
-
-bool TargetCXXABI::tryParse(llvm::StringRef name) {
-  const Kind unknown = static_cast<Kind>(-1);
-  Kind kind = llvm::StringSwitch<Kind>(name)
-    .Case("arm", GenericARM)
-    .Case("ios", iOS)
-    .Case("itanium", GenericItanium)
-    .Case("microsoft", Microsoft)
-    .Case("mips", GenericMIPS)
-    .Default(unknown);
-  if (kind == unknown) return false;
-
-  set(kind);
-  return true;
-}