From b8df4093e4d82c67a419911a46b63482043643e5 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 25 Jun 2022 11:55:33 -0700 Subject: [clang, clang-tools-extra] Don't use Optional::{hasValue,getValue} (NFC) --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index f7bac66..17b8e6b 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2839,7 +2839,7 @@ bool CodeGenModule::isProfileInstrExcluded(llvm::Function *Fn, auto &SM = Context.getSourceManager(); if (const auto *MainFile = SM.getFileEntryForID(SM.getMainFileID())) { Optional V = ProfileList.isFileExcluded(MainFile->getName(), Kind); - if (V.hasValue()) + if (V) return *V; } return ProfileList.getDefault(); -- cgit v1.1