[clang] d50dec6 - Fix MSVC "not all control paths return a value" warnings. NFC.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 1 01:57:42 PST 2024
Author: Simon Pilgrim
Date: 2024-03-01T09:57:09Z
New Revision: d50dec6f413ce1953bede94bdd11261b6684c7c4
URL: https://github.com/llvm/llvm-project/commit/d50dec6f413ce1953bede94bdd11261b6684c7c4
DIFF: https://github.com/llvm/llvm-project/commit/d50dec6f413ce1953bede94bdd11261b6684c7c4.diff
LOG: Fix MSVC "not all control paths return a value" warnings. NFC.
Added:
Modified:
clang/include/clang/Basic/TargetInfo.h
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/TargetInfo.h b/clang/include/clang/Basic/TargetInfo.h
index b94d13609c3dd2..7682f84e491c7b 100644
--- a/clang/include/clang/Basic/TargetInfo.h
+++ b/clang/include/clang/Basic/TargetInfo.h
@@ -1386,7 +1386,7 @@ class TargetInfo : public TransferrableTargetInfo,
case LangOptions::SignReturnAddressScopeKind::All:
return "all";
}
- assert(false && "Unexpected SignReturnAddressScopeKind");
+ llvm_unreachable("Unexpected SignReturnAddressScopeKind");
}
const char *getSignKeyStr() const {
@@ -1396,7 +1396,7 @@ class TargetInfo : public TransferrableTargetInfo,
case LangOptions::SignReturnAddressKeyKind::BKey:
return "b_key";
}
- assert(false && "Unexpected SignReturnAddressKeyKind");
+ llvm_unreachable("Unexpected SignReturnAddressKeyKind");
}
};
More information about the cfe-commits
mailing list