llvm/llvm/lib/IR/MDBuilder.cpp

//===---- llvm/MDBuilder.cpp - Builder for LLVM metadata ------------------===//
//
// 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 defines the MDBuilder class, which is used as a convenient way to
// create LLVM metadata with a consistent and simplified interface.
//
//===----------------------------------------------------------------------===//

#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Metadata.h"
usingnamespacellvm;

MDString *MDBuilder::createString(StringRef Str) {}

ConstantAsMetadata *MDBuilder::createConstant(Constant *C) {}

MDNode *MDBuilder::createFPMath(float Accuracy) {}

MDNode *MDBuilder::createBranchWeights(uint32_t TrueWeight,
                                       uint32_t FalseWeight, bool IsExpected) {}

MDNode *MDBuilder::createLikelyBranchWeights() {}

MDNode *MDBuilder::createUnlikelyBranchWeights() {}

MDNode *MDBuilder::createBranchWeights(ArrayRef<uint32_t> Weights,
                                       bool IsExpected) {}

MDNode *MDBuilder::createUnpredictable() {}

MDNode *MDBuilder::createFunctionEntryCount(
    uint64_t Count, bool Synthetic,
    const DenseSet<GlobalValue::GUID> *Imports) {}

MDNode *MDBuilder::createFunctionSectionPrefix(StringRef Prefix) {}

MDNode *MDBuilder::createRange(const APInt &Lo, const APInt &Hi) {}

MDNode *MDBuilder::createRange(Constant *Lo, Constant *Hi) {}

MDNode *MDBuilder::createCallees(ArrayRef<Function *> Callees) {}

MDNode *MDBuilder::createCallbackEncoding(unsigned CalleeArgNo,
                                          ArrayRef<int> Arguments,
                                          bool VarArgArePassed) {}

MDNode *MDBuilder::mergeCallbackEncodings(MDNode *ExistingCallbacks,
                                          MDNode *NewCB) {}

MDNode *MDBuilder::createRTTIPointerPrologue(Constant *PrologueSig,
                                             Constant *RTTI) {}

MDNode *MDBuilder::createPCSections(ArrayRef<PCSection> Sections) {}

MDNode *MDBuilder::createAnonymousAARoot(StringRef Name, MDNode *Extra) {}

MDNode *MDBuilder::createTBAARoot(StringRef Name) {}

/// Return metadata for a non-root TBAA node with the given name,
/// parent in the TBAA tree, and value for 'pointsToConstantMemory'.
MDNode *MDBuilder::createTBAANode(StringRef Name, MDNode *Parent,
                                  bool isConstant) {}

MDNode *MDBuilder::createAliasScopeDomain(StringRef Name) {}

MDNode *MDBuilder::createAliasScope(StringRef Name, MDNode *Domain) {}

/// Return metadata for a tbaa.struct node with the given
/// struct field descriptions.
MDNode *MDBuilder::createTBAAStructNode(ArrayRef<TBAAStructField> Fields) {}

/// Return metadata for a TBAA struct node in the type DAG
/// with the given name, a list of pairs (offset, field type in the type DAG).
MDNode *MDBuilder::createTBAAStructTypeNode(
    StringRef Name, ArrayRef<std::pair<MDNode *, uint64_t>> Fields) {}

/// Return metadata for a TBAA scalar type node with the
/// given name, an offset and a parent in the TBAA type DAG.
MDNode *MDBuilder::createTBAAScalarTypeNode(StringRef Name, MDNode *Parent,
                                            uint64_t Offset) {}

/// Return metadata for a TBAA tag node with the given
/// base type, access type and offset relative to the base type.
MDNode *MDBuilder::createTBAAStructTagNode(MDNode *BaseType, MDNode *AccessType,
                                           uint64_t Offset, bool IsConstant) {}

MDNode *MDBuilder::createTBAATypeNode(MDNode *Parent, uint64_t Size,
                                      Metadata *Id,
                                      ArrayRef<TBAAStructField> Fields) {}

MDNode *MDBuilder::createTBAAAccessTag(MDNode *BaseType, MDNode *AccessType,
                                       uint64_t Offset, uint64_t Size,
                                       bool IsImmutable) {}

MDNode *MDBuilder::createMutableTBAAAccessTag(MDNode *Tag) {}

MDNode *MDBuilder::createIrrLoopHeaderWeight(uint64_t Weight) {}

MDNode *MDBuilder::createPseudoProbeDesc(uint64_t GUID, uint64_t Hash,
                                         StringRef FName) {}

MDNode *
MDBuilder::createLLVMStats(ArrayRef<std::pair<StringRef, uint64_t>> LLVMStats) {}