[clang] [Clang] Make Unlabeled the default control flow branch label scheme (PR #223297)

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 13 22:13:42 PDT 2026


================
@@ -651,12 +651,7 @@ bool RISCVTargetInfo::checkCFBranchLabelSchemeSupported(
   // implements it
   switch (Scheme) {
   case CFBranchLabelSchemeKind::Default:
-    Diags.Report(diag::err_opt_not_valid_without_opt)
-        << "-fcf-protection=branch"
-        << (Twine("-mcf-branch-label-scheme=") +
-            getCFBranchLabelSchemeFlagVal(CFBranchLabelSchemeKind::Unlabeled))
-               .str();
-    return false;
+    return true;
----------------
topperc wrote:

Is the TODO above this still relevant?

https://github.com/llvm/llvm-project/pull/223297


More information about the cfe-commits mailing list