[llvm] b5f7b69 - [AArch64] fix buildbot by removing dead code

Tomas Matheson via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 08:03:58 PDT 2024


Author: Tomas Matheson
Date: 2024-08-20T16:03:14+01:00
New Revision: b5f7b6961d2bc4d852fc3a5992aecf5e2e48baee

URL: https://github.com/llvm/llvm-project/commit/b5f7b6961d2bc4d852fc3a5992aecf5e2e48baee
DIFF: https://github.com/llvm/llvm-project/commit/b5f7b6961d2bc4d852fc3a5992aecf5e2e48baee.diff

LOG: [AArch64] fix buildbot by removing dead code

Failure with -Werror buildbot caused by #104587

Added: 
    

Modified: 
    llvm/unittests/TargetParser/TargetParserTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/TargetParser/TargetParserTest.cpp b/llvm/unittests/TargetParser/TargetParserTest.cpp
index 06140611f1b14..7d999b826252a 100644
--- a/llvm/unittests/TargetParser/TargetParserTest.cpp
+++ b/llvm/unittests/TargetParser/TargetParserTest.cpp
@@ -66,21 +66,6 @@ std::string FormatExtensionFlags(int64_t Flags) {
   return llvm::join(Features, ", ");
 }
 
-std::string FormatExtensionFlags(AArch64::ExtensionBitset Flags) {
-  std::vector<StringRef> Features;
-  AArch64::getExtensionFeatures(Flags, Features);
-
-  // The target parser also includes every extension you don't have.
-  // E.g. if AEK_CRC is not set then it adds "-crc". Not useful here.
-  Features.erase(std::remove_if(Features.begin(), Features.end(),
-                                [](StringRef extension) {
-                                  return extension.starts_with("-");
-                                }),
-                 Features.end());
-
-  return llvm::join(Features, ", ");
-}
-
 std::string SerializeExtensionFlags(AArch64::ExtensionBitset Flags) {
   std::string SerializedFlags;
   std::ostringstream ss;
@@ -119,26 +104,6 @@ template <ARM::ISAKind ISAKind> struct AssertSameExtensionFlags {
                             FormatExtensionFlags(GotFlags), GotFlags, CPUName,
                             FormatExtensionFlags(ExpectedFlags ^ GotFlags));
   }
-
-  testing::AssertionResult operator()(const char *m_expr, const char *n_expr,
-                                      AArch64::ExtensionBitset ExpectedFlags,
-                                      AArch64::ExtensionBitset GotFlags) {
-    if (ExpectedFlags == GotFlags)
-      return testing::AssertionSuccess();
-
-    return testing::AssertionFailure()
-           << llvm::formatv("CPU: {4}\n"
-                            "Expected extension flags: {0} ({1})\n"
-                            "     Got extension flags: {2} ({3})\n"
-                            "                    Diff: {5} ({6})\n",
-                            FormatExtensionFlags(ExpectedFlags),
-                            SerializeExtensionFlags(ExpectedFlags),
-                            FormatExtensionFlags(GotFlags),
-                            SerializeExtensionFlags(GotFlags), CPUName,
-                            FormatExtensionFlags(ExpectedFlags ^ GotFlags),
-                            SerializeExtensionFlags(ExpectedFlags ^ GotFlags));
-  }
-
 private:
   StringRef CPUName;
 };


        


More information about the llvm-commits mailing list