From e3b557809604d036af6e00c60f012c2025b59a5e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 11 Feb 2023 13:38:04 +0100 Subject: Vendor import of llvm-project main llvmorg-16-init-18548-gb0daacf58f41, the last commit before the upstream release/17.x branch was created. --- llvm/lib/IR/LLVMContext.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'llvm/lib/IR/LLVMContext.cpp') diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index 4a1d5d3dcdf6..7911705776e3 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -87,6 +87,11 @@ LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) { "ptrauth operand bundle id drifted!"); (void)PtrauthEntry; + auto *KCFIEntry = pImpl->getOrInsertBundleTag("kcfi"); + assert(KCFIEntry->second == LLVMContext::OB_kcfi && + "kcfi operand bundle id drifted!"); + (void)KCFIEntry; + SyncScope::ID SingleThreadSSID = pImpl->getOrInsertSyncScopeID("singlethread"); assert(SingleThreadSSID == SyncScope::SingleThread && @@ -135,7 +140,7 @@ bool LLVMContext::getDiagnosticsHotnessRequested() const { return pImpl->DiagnosticsHotnessRequested; } -void LLVMContext::setDiagnosticsHotnessThreshold(Optional Threshold) { +void LLVMContext::setDiagnosticsHotnessThreshold(std::optional Threshold) { pImpl->DiagnosticsHotnessThreshold = Threshold; } void LLVMContext::setMisExpectWarningRequested(bool Requested) { @@ -148,10 +153,10 @@ uint64_t LLVMContext::getDiagnosticsHotnessThreshold() const { return pImpl->DiagnosticsHotnessThreshold.value_or(UINT64_MAX); } void LLVMContext::setDiagnosticsMisExpectTolerance( - Optional Tolerance) { + std::optional Tolerance) { pImpl->DiagnosticsMisExpectTolerance = Tolerance; } -uint64_t LLVMContext::getDiagnosticsMisExpectTolerance() const { +uint32_t LLVMContext::getDiagnosticsMisExpectTolerance() const { return pImpl->DiagnosticsMisExpectTolerance.value_or(0); } @@ -363,10 +368,6 @@ std::unique_ptr LLVMContext::getDiagnosticHandler() { return std::move(pImpl->DiagHandler); } -bool LLVMContext::hasSetOpaquePointersValue() const { - return pImpl->hasOpaquePointersValue(); -} - void LLVMContext::setOpaquePointers(bool Enable) const { pImpl->setOpaquePointers(Enable); } @@ -374,7 +375,3 @@ void LLVMContext::setOpaquePointers(bool Enable) const { bool LLVMContext::supportsTypedPointers() const { return !pImpl->getOpaquePointers(); } - -Any &LLVMContext::getTargetData() const { - return pImpl->TargetDataStorage; -} -- cgit v1.2.3