[libc][NFC] Fix a few compiler warnings.

This commit is contained in:
Siva Chandra Reddy 2022-08-09 22:27:46 +00:00
parent 46fe24e2fb
commit 80652d270a
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ using _64 = Chained<_32, _32>;
struct ZVA {
static constexpr size_t SIZE = 64;
static void splat_set(char *dst, const unsigned char value) {
static void splat_set(char *dst, const unsigned char) {
#if __SIZEOF_POINTER__ == 4
asm("dc zva, %w[dst]" : : [dst] "r"(dst) : "memory");
#else

View File

@ -83,7 +83,7 @@ void APIIndexer::indexStandardSpecDef(llvm::Record *StandardSpec) {
auto HeaderSpecList = StandardSpec->getValueAsListOfDefs("Headers");
for (llvm::Record *HeaderSpec : HeaderSpecList) {
llvm::StringRef Header = HeaderSpec->getValueAsString("Name");
if (!StdHeader.hasValue() || Header == StdHeader) {
if (!StdHeader.has_value() || Header == StdHeader) {
PublicHeaders.emplace(Header);
auto MacroSpecList = HeaderSpec->getValueAsListOfDefs("Macros");
// TODO: Trigger a fatal error on duplicate specs.
@ -163,7 +163,7 @@ void APIIndexer::index(llvm::RecordKeeper &Records) {
if (isaStandardSpec(Def))
indexStandardSpecDef(Def);
if (isaPublicAPI(Def)) {
if (!StdHeader.hasValue() ||
if (!StdHeader.has_value() ||
Def->getValueAsString("HeaderName") == StdHeader)
indexPublicAPIDef(Def);
}