Author: Tom Honermann
Date: 2022-03-21T13:39:43-04:00
New Revision: 01b2e0567c549ef5b7be9026b6a602590d9c3568

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

LOG: [clang] NFC: Redundant code removal in SemaDecl.cpp, 
CheckTargetCausesMultiVersioning().

This change removes redundant code in the definition of
CheckTargetCausesMultiVersioning() in SemaDecl.cpp. The removed code checked
for multiversion function support. The code immediately following the removed
code is a call to CheckMultiVersionAdditionalRules(); that function performs
the same check on entry. In both cases, the consequences of missing multiversion
function support results in the same diagnostic message being issued and the
applicable function declaration being marked as invalid.

Reviewed By: erichkeane, aaron.ballman

Differential Revision: https://reviews.llvm.org/D121957

Added: 
    

Modified: 
    clang/lib/Sema/SemaDecl.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 852bf64a0a586..5bc01e80dad05 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -10610,13 +10610,6 @@ static bool CheckTargetCausesMultiVersioning(
     return false;
 
   // Otherwise, this decl causes MultiVersioning.
-  if (!S.getASTContext().getTargetInfo().supportsMultiVersioning()) {
-    S.Diag(NewFD->getLocation(), diag::err_multiversion_not_supported);
-    S.Diag(OldFD->getLocation(), diag::note_previous_declaration);
-    NewFD->setInvalidDecl();
-    return true;
-  }
-
   if (CheckMultiVersionAdditionalRules(S, OldFD, NewFD, true,
                                        MultiVersionKind::Target)) {
     NewFD->setInvalidDecl();


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to