[llvm] b647a34 - [AArch64] Fix -Wreturn-type in AArch64TargetParser.cpp (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 17 15:56:08 PST 2024
Author: Jie Fu
Date: 2024-01-18T07:54:55+08:00
New Revision: b647a34c9f4ef1527c4641eaa51a771ce81a1fe7
URL: https://github.com/llvm/llvm-project/commit/b647a34c9f4ef1527c4641eaa51a771ce81a1fe7
DIFF: https://github.com/llvm/llvm-project/commit/b647a34c9f4ef1527c4641eaa51a771ce81a1fe7.diff
LOG: [AArch64] Fix -Wreturn-type in AArch64TargetParser.cpp (NFC)
llvm-project/llvm/lib/TargetParser/AArch64TargetParser.cpp:157:1:
error: non-void function does not return a value in all control paths [-Werror,-Wreturn-type]
}
^
1 error generated.
Added:
Modified:
llvm/lib/TargetParser/AArch64TargetParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/TargetParser/AArch64TargetParser.cpp b/llvm/lib/TargetParser/AArch64TargetParser.cpp
index b90e2a4984c0ad..fd47f786a46ef4 100644
--- a/llvm/lib/TargetParser/AArch64TargetParser.cpp
+++ b/llvm/lib/TargetParser/AArch64TargetParser.cpp
@@ -153,7 +153,7 @@ lookupExtensionByID(llvm::AArch64::ArchExtKind ExtID) {
for (const auto &E : llvm::AArch64::Extensions)
if (E.ID == ExtID)
return E;
- assert(false && "Invalid extension ID");
+ llvm_unreachable("Invalid extension ID");
}
void AArch64::ExtensionSet::enable(ArchExtKind E) {
More information about the llvm-commits
mailing list