llvm/llvm/lib/IR/LLVMContext.cpp

//===-- LLVMContext.cpp - Implement LLVMContext ---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
//  This file implements LLVMContext, as a wrapper around the opaque
//  class LLVMContextImpl.
//
//===----------------------------------------------------------------------===//

#include "llvm/IR/LLVMContext.h"
#include "LLVMContextImpl.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/LLVMRemarkStreamer.h"
#include "llvm/Remarks/RemarkStreamer.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdlib>
#include <string>
#include <utility>

usingnamespacellvm;

LLVMContext::LLVMContext() :{}

LLVMContext::~LLVMContext() {}

void LLVMContext::addModule(Module *M) {}

void LLVMContext::removeModule(Module *M) {}

unsigned LLVMContext::generateMachineFunctionNum(Function &F) {}

//===----------------------------------------------------------------------===//
// Recoverable Backend Errors
//===----------------------------------------------------------------------===//

void LLVMContext::setDiagnosticHandlerCallBack(
    DiagnosticHandler::DiagnosticHandlerTy DiagnosticHandler,
    void *DiagnosticContext, bool RespectFilters) {}

void LLVMContext::setDiagnosticHandler(std::unique_ptr<DiagnosticHandler> &&DH,
                                      bool RespectFilters) {}

void LLVMContext::setDiagnosticsHotnessRequested(bool Requested) {}
bool LLVMContext::getDiagnosticsHotnessRequested() const {}

void LLVMContext::setDiagnosticsHotnessThreshold(std::optional<uint64_t> Threshold) {}
void LLVMContext::setMisExpectWarningRequested(bool Requested) {}
bool LLVMContext::getMisExpectWarningRequested() const {}
uint64_t LLVMContext::getDiagnosticsHotnessThreshold() const {}
void LLVMContext::setDiagnosticsMisExpectTolerance(
    std::optional<uint32_t> Tolerance) {}
uint32_t LLVMContext::getDiagnosticsMisExpectTolerance() const {}

bool LLVMContext::isDiagnosticsHotnessThresholdSetFromPSI() const {}

remarks::RemarkStreamer *LLVMContext::getMainRemarkStreamer() {}
const remarks::RemarkStreamer *LLVMContext::getMainRemarkStreamer() const {}
void LLVMContext::setMainRemarkStreamer(
    std::unique_ptr<remarks::RemarkStreamer> RemarkStreamer) {}

LLVMRemarkStreamer *LLVMContext::getLLVMRemarkStreamer() {}
const LLVMRemarkStreamer *LLVMContext::getLLVMRemarkStreamer() const {}
void LLVMContext::setLLVMRemarkStreamer(
    std::unique_ptr<LLVMRemarkStreamer> RemarkStreamer) {}

DiagnosticHandler::DiagnosticHandlerTy
LLVMContext::getDiagnosticHandlerCallBack() const {}

void *LLVMContext::getDiagnosticContext() const {}

void LLVMContext::setYieldCallback(YieldCallbackTy Callback, void *OpaqueHandle)
{}

void LLVMContext::yield() {}

void LLVMContext::emitError(const Twine &ErrorStr) {}

void LLVMContext::emitError(const Instruction *I, const Twine &ErrorStr) {}

static bool isDiagnosticEnabled(const DiagnosticInfo &DI) {}

const char *
LLVMContext::getDiagnosticMessagePrefix(DiagnosticSeverity Severity) {}

void LLVMContext::diagnose(const DiagnosticInfo &DI) {}

void LLVMContext::emitError(uint64_t LocCookie, const Twine &ErrorStr) {}

//===----------------------------------------------------------------------===//
// Metadata Kind Uniquing
//===----------------------------------------------------------------------===//

/// Return a unique non-zero ID for the specified metadata kind.
unsigned LLVMContext::getMDKindID(StringRef Name) const {}

/// getHandlerNames - Populate client-supplied smallvector using custom
/// metadata name and ID.
void LLVMContext::getMDKindNames(SmallVectorImpl<StringRef> &Names) const {}

void LLVMContext::getOperandBundleTags(SmallVectorImpl<StringRef> &Tags) const {}

StringMapEntry<uint32_t> *
LLVMContext::getOrInsertBundleTag(StringRef TagName) const {}

uint32_t LLVMContext::getOperandBundleTagID(StringRef Tag) const {}

SyncScope::ID LLVMContext::getOrInsertSyncScopeID(StringRef SSN) {}

void LLVMContext::getSyncScopeNames(SmallVectorImpl<StringRef> &SSNs) const {}

std::optional<StringRef> LLVMContext::getSyncScopeName(SyncScope::ID Id) const {}

void LLVMContext::setGC(const Function &Fn, std::string GCName) {}

const std::string &LLVMContext::getGC(const Function &Fn) {}

void LLVMContext::deleteGC(const Function &Fn) {}

bool LLVMContext::shouldDiscardValueNames() const {}

bool LLVMContext::isODRUniquingDebugTypes() const {}

void LLVMContext::enableDebugTypeODRUniquing() {}

void LLVMContext::disableDebugTypeODRUniquing() {}

void LLVMContext::setDiscardValueNames(bool Discard) {}

OptPassGate &LLVMContext::getOptPassGate() const {}

void LLVMContext::setOptPassGate(OptPassGate& OPG) {}

const DiagnosticHandler *LLVMContext::getDiagHandlerPtr() const {}

std::unique_ptr<DiagnosticHandler> LLVMContext::getDiagnosticHandler() {}

StringRef LLVMContext::getDefaultTargetCPU() {}

void LLVMContext::setDefaultTargetCPU(StringRef CPU) {}

StringRef LLVMContext::getDefaultTargetFeatures() {}

void LLVMContext::setDefaultTargetFeatures(StringRef Features) {}