[clang] [CIR] Fix warning in CIRGenAction.cpp (PR #118389)
David Olsen via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 11:33:47 PST 2024
https://github.com/dkolsen-pgi created https://github.com/llvm/llvm-project/pull/118389
Fix a compiler warning in `CIRGenConsumer::HandleTranslationUnit` in `clang/lib/CIR/FrontendAction/CIRGenAction.cpp`. The warning was about a `default:` section in a switch statement that already covered all the values of an enum. Delete the `default:` section.
>From 86ec263fb1d4d50fdf29501dceecedef64656d4a Mon Sep 17 00:00:00 2001
From: David Olsen <dolsen at nvidia.com>
Date: Mon, 2 Dec 2024 11:27:03 -0800
Subject: [PATCH] [CIR] Fix warning in CIRGenAction.cpp
Fix a compiler warning in `CIRGenConsumer::HandleTranslationUnit` in
`clang/lib/CIR/FrontendAction/CIRGenAction.cpp`. The warning was about a
`default:` section in a switch statement that already covered all the
values of an enum. Delete the `default:` section.
---
clang/lib/CIR/FrontendAction/CIRGenAction.cpp | 3 ---
1 file changed, 3 deletions(-)
diff --git a/clang/lib/CIR/FrontendAction/CIRGenAction.cpp b/clang/lib/CIR/FrontendAction/CIRGenAction.cpp
index 5a31e207081936..21b6bc56ed0503 100644
--- a/clang/lib/CIR/FrontendAction/CIRGenAction.cpp
+++ b/clang/lib/CIR/FrontendAction/CIRGenAction.cpp
@@ -66,9 +66,6 @@ class CIRGenConsumer : public clang::ASTConsumer {
MlirModule->print(*OutputStream, Flags);
}
break;
- default:
- llvm_unreachable("NYI: CIRGenAction other than EmitCIR");
- break;
}
}
};
More information about the cfe-commits
mailing list