LLVM 20.0.0git
Namespaces | Macros | Functions | Variables
LLParser.cpp File Reference
#include "llvm/AsmParser/LLParser.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/AsmParser/LLToken.h"
#include "llvm/AsmParser/SlotMapping.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/AutoUpgrade.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Comdat.h"
#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/ConstantRangeList.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalIFunc.h"
#include "llvm/IR/GlobalObject.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/Value.h"
#include "llvm/IR/ValueSymbolTable.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/ModRef.h"
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstring>
#include <optional>
#include <vector>
#include "llvm/IR/Attributes.inc"
#include "llvm/IR/Metadata.def"

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Macros

#define GET_ATTR_NAMES
 
#define ATTRIBUTE_ENUM(ENUM_NAME, DISPLAY_NAME)
 
#define HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS)
 
#define DECLARE_FIELD(NAME, TYPE, INIT)   TYPE NAME INIT
 
#define NOP_FIELD(NAME, TYPE, INIT)
 
#define REQUIRE_FIELD(NAME, TYPE, INIT)
 
#define PARSE_MD_FIELD(NAME, TYPE, DEFAULT)
 
#define PARSE_MD_FIELDS()
 
#define GET_OR_DISTINCT(CLASS, ARGS)    (IsDistinct ? CLASS::getDistinct ARGS : CLASS::get ARGS)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
 

Functions

static std::string getTypeString (Type *T)
 
static void dropIntrinsicWithUnknownMetadataArgument (IntrinsicInst *II)
 
static bool isValidVisibilityForLinkage (unsigned V, unsigned L)
 
static bool isValidDLLStorageClassForLinkage (unsigned S, unsigned L)
 
static void maybeSetDSOLocal (bool DSOLocal, GlobalValue &GV)
 
static bool isSanitizer (lltok::Kind Kind)
 
static Attribute::AttrKind tokenToAttribute (lltok::Kind Kind)
 
static bool upgradeMemoryAttr (MemoryEffects &ME, lltok::Kind Kind)
 
static GlobalValuecreateGlobalFwdRef (Module *M, PointerType *PTy)
 
static unsigned parseOptionalLinkageAux (lltok::Kind Kind, bool &HasLinkage)
 
static std::optional< MemoryEffects::LocationkeywordToLoc (lltok::Kind Tok)
 
static std::optional< ModRefInfokeywordToModRef (lltok::Kind Tok)
 
static unsigned keywordToFPClassTest (lltok::Kind Tok)
 
bool isOldDbgFormatIntrinsic (StringRef Name)
 
static void resolveFwdRef (ValueInfo *Fwd, ValueInfo &Resolved)
 

Variables

static cl::opt< boolAllowIncompleteIR ("allow-incomplete-ir", cl::init(false), cl::Hidden, cl::desc("Allow incomplete IR on a best effort basis (references to unknown " "metadata will be dropped)"))
 
llvm::cl::opt< boolUseNewDbgInfoFormat
 
cl::opt< cl::boolOrDefault > PreserveInputDbgFormat
 
bool WriteNewDbgInfoFormatToBitcode
 
cl::opt< boolWriteNewDbgInfoFormat
 
static ValueInfo EmptyVI
 
static const auto FwdVIRef = (GlobalValueSummaryMapTy::value_type *)-8
 

Macro Definition Documentation

◆ ATTRIBUTE_ENUM

#define ATTRIBUTE_ENUM (   ENUM_NAME,
  DISPLAY_NAME 
)
Value:
case lltok::kw_##DISPLAY_NAME: \
return Attribute::ENUM_NAME;

◆ DECLARE_FIELD

#define DECLARE_FIELD (   NAME,
  TYPE,
  INIT 
)    TYPE NAME INIT

Definition at line 5151 of file LLParser.cpp.

◆ GET_ATTR_NAMES

#define GET_ATTR_NAMES

◆ GET_OR_DISTINCT

#define GET_OR_DISTINCT (   CLASS,
  ARGS 
)     (IsDistinct ? CLASS::getDistinct ARGS : CLASS::get ARGS)

Definition at line 5173 of file LLParser.cpp.

◆ HANDLE_SPECIALIZED_MDNODE_LEAF

#define HANDLE_SPECIALIZED_MDNODE_LEAF (   CLASS)
Value:
if (Lex.getStrVal() == #CLASS) \
return parse##CLASS(N, IsDistinct);
#define N
Definition: regcomp.c:192

◆ NOP_FIELD

#define NOP_FIELD (   NAME,
  TYPE,
  INIT 
)

Definition at line 5152 of file LLParser.cpp.

◆ PARSE_MD_FIELD

#define PARSE_MD_FIELD (   NAME,
  TYPE,
  DEFAULT 
)
Value:
if (Lex.getStrVal() == #NAME) \
return parseMDField(#NAME, NAME);

Definition at line 5156 of file LLParser.cpp.

◆ PARSE_MD_FIELDS

#define PARSE_MD_FIELDS ( )
Value:
do { \
LocTy ClosingLoc; \
if (parseMDFieldsImpl( \
[&]() -> bool { \
VISIT_MD_FIELDS(PARSE_MD_FIELD, PARSE_MD_FIELD) \
return tokError(Twine("invalid field '") + Lex.getStrVal() + \
"'"); \
}, \
ClosingLoc)) \
return true; \
VISIT_MD_FIELDS(NOP_FIELD, REQUIRE_FIELD) \
} while (false)
#define NOP_FIELD(NAME, TYPE, INIT)
Definition: LLParser.cpp:5152
#define REQUIRE_FIELD(NAME, TYPE, INIT)
Definition: LLParser.cpp:5153
#define DECLARE_FIELD(NAME, TYPE, INIT)
Definition: LLParser.cpp:5151
#define PARSE_MD_FIELD(NAME, TYPE, DEFAULT)
Definition: LLParser.cpp:5156
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81

Definition at line 5159 of file LLParser.cpp.

◆ REQUIRE_FIELD

#define REQUIRE_FIELD (   NAME,
  TYPE,
  INIT 
)
Value:
if (!NAME.Seen) \
return error(ClosingLoc, "missing required field '" #NAME "'");
#define error(X)

Definition at line 5153 of file LLParser.cpp.

◆ VISIT_MD_FIELDS [1/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
OPTIONAL(line, LineField, ); \
OPTIONAL(column, ColumnField, ); \
REQUIRED(scope, MDField, (/* AllowNull */ false)); \
OPTIONAL(inlinedAt, MDField, ); \
OPTIONAL(isImplicitCode, MDBoolField, (false));
@ OPTIONAL
The target may be valid if the source is not.

◆ VISIT_MD_FIELDS [2/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(tag, DwarfTagField, ); \
OPTIONAL(header, MDStringField, ); \
OPTIONAL(operands, MDFieldList, );
@ REQUIRED
The target cannot be valid if the source is not.

◆ VISIT_MD_FIELDS [3/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
OPTIONAL(count, MDSignedOrMDField, (-1, -1, INT64_MAX, false)); \
OPTIONAL(lowerBound, MDSignedOrMDField, ); \
OPTIONAL(upperBound, MDSignedOrMDField, ); \
OPTIONAL(stride, MDSignedOrMDField, );
static int64_t upperBound(StackOffset Size)
#define INT64_MAX
Definition: DataTypes.h:71
auto count(R &&Range, const E &Element)
Wrapper function around std::count to count the number of times an element Element occurs in the give...
Definition: STLExtras.h:1938

◆ VISIT_MD_FIELDS [4/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
OPTIONAL(count, MDSignedOrMDField, ); \
OPTIONAL(lowerBound, MDSignedOrMDField, ); \
OPTIONAL(upperBound, MDSignedOrMDField, ); \
OPTIONAL(stride, MDSignedOrMDField, );

◆ VISIT_MD_FIELDS [5/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(name, MDStringField, ); \
REQUIRED(value, MDAPSIntField, ); \
OPTIONAL(isUnsigned, MDBoolField, (false));
Given that RA is a live value
static const char * name
Definition: SMEABIPass.cpp:46

◆ VISIT_MD_FIELDS [6/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
OPTIONAL(tag, DwarfTagField, (dwarf::DW_TAG_base_type)); \
OPTIONAL(name, MDStringField, ); \
OPTIONAL(size, MDUnsignedField, (0, UINT64_MAX)); \
OPTIONAL(align, MDUnsignedField, (0, UINT32_MAX)); \
OPTIONAL(encoding, DwarfAttEncodingField, ); \
OPTIONAL(num_extra_inhabitants, MDUnsignedField, (0, UINT32_MAX)); \
OPTIONAL(flags, DIFlagField, );
#define UINT64_MAX
Definition: DataTypes.h:77

◆ VISIT_MD_FIELDS [7/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
OPTIONAL(tag, DwarfTagField, (dwarf::DW_TAG_string_type)); \
OPTIONAL(name, MDStringField, ); \
OPTIONAL(stringLength, MDField, ); \
OPTIONAL(stringLengthExpression, MDField, ); \
OPTIONAL(stringLocationExpression, MDField, ); \
OPTIONAL(size, MDUnsignedField, (0, UINT64_MAX)); \
OPTIONAL(align, MDUnsignedField, (0, UINT32_MAX)); \
OPTIONAL(encoding, DwarfAttEncodingField, );

◆ VISIT_MD_FIELDS [8/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(tag, DwarfTagField, ); \
OPTIONAL(name, MDStringField, ); \
OPTIONAL(file, MDField, ); \
OPTIONAL(line, LineField, ); \
OPTIONAL(scope, MDField, ); \
REQUIRED(baseType, MDField, ); \
OPTIONAL(size, MDUnsignedField, (0, UINT64_MAX)); \
OPTIONAL(align, MDUnsignedField, (0, UINT32_MAX)); \
OPTIONAL(offset, MDUnsignedField, (0, UINT64_MAX)); \
OPTIONAL(flags, DIFlagField, ); \
OPTIONAL(extraData, MDField, ); \
OPTIONAL(dwarfAddressSpace, MDUnsignedField, (UINT32_MAX, UINT32_MAX)); \
OPTIONAL(annotations, MDField, ); \
OPTIONAL(ptrAuthKey, MDUnsignedField, (0, 7)); \
OPTIONAL(ptrAuthIsAddressDiscriminated, MDBoolField, ); \
OPTIONAL(ptrAuthExtraDiscriminator, MDUnsignedField, (0, 0xffff)); \
OPTIONAL(ptrAuthIsaPointer, MDBoolField, ); \
OPTIONAL(ptrAuthAuthenticatesNullValues, MDBoolField, );
dot regions Print regions of function to dot file(with no function bodies)"

◆ VISIT_MD_FIELDS [9/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(tag, DwarfTagField, ); \
OPTIONAL(name, MDStringField, ); \
OPTIONAL(file, MDField, ); \
OPTIONAL(line, LineField, ); \
OPTIONAL(scope, MDField, ); \
OPTIONAL(baseType, MDField, ); \
OPTIONAL(size, MDUnsignedField, (0, UINT64_MAX)); \
OPTIONAL(align, MDUnsignedField, (0, UINT32_MAX)); \
OPTIONAL(offset, MDUnsignedField, (0, UINT64_MAX)); \
OPTIONAL(flags, DIFlagField, ); \
OPTIONAL(elements, MDField, ); \
OPTIONAL(runtimeLang, DwarfLangField, ); \
OPTIONAL(vtableHolder, MDField, ); \
OPTIONAL(templateParams, MDField, ); \
OPTIONAL(identifier, MDStringField, ); \
OPTIONAL(discriminator, MDField, ); \
OPTIONAL(dataLocation, MDField, ); \
OPTIONAL(associated, MDField, ); \
OPTIONAL(allocated, MDField, ); \
OPTIONAL(rank, MDSignedOrMDField, ); \
OPTIONAL(annotations, MDField, ); \
OPTIONAL(num_extra_inhabitants, MDUnsignedField, (0, UINT32_MAX)); \
OPTIONAL(specification, MDField, );
Utility type to build an inheritance chain that makes it easy to rank overload candidates.
Definition: STLExtras.h:1496

◆ VISIT_MD_FIELDS [10/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
OPTIONAL(flags, DIFlagField, ); \
OPTIONAL(cc, DwarfCCField, ); \
REQUIRED(types, MDField, );

◆ VISIT_MD_FIELDS [11/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(filename, MDStringField, ); \
REQUIRED(directory, MDStringField, ); \
OPTIONAL(checksumkind, ChecksumKindField, (DIFile::CSK_MD5)); \
OPTIONAL(checksum, MDStringField, ); \
OPTIONAL(source, MDStringField, );

◆ VISIT_MD_FIELDS [12/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(language, DwarfLangField, ); \
REQUIRED(file, MDField, (/* AllowNull */ false)); \
OPTIONAL(producer, MDStringField, ); \
OPTIONAL(isOptimized, MDBoolField, ); \
OPTIONAL(flags, MDStringField, ); \
OPTIONAL(runtimeVersion, MDUnsignedField, (0, UINT32_MAX)); \
OPTIONAL(splitDebugFilename, MDStringField, ); \
OPTIONAL(emissionKind, EmissionKindField, ); \
OPTIONAL(enums, MDField, ); \
OPTIONAL(retainedTypes, MDField, ); \
OPTIONAL(globals, MDField, ); \
OPTIONAL(imports, MDField, ); \
OPTIONAL(macros, MDField, ); \
OPTIONAL(dwoId, MDUnsignedField, ); \
OPTIONAL(splitDebugInlining, MDBoolField, = true); \
OPTIONAL(debugInfoForProfiling, MDBoolField, = false); \
OPTIONAL(nameTableKind, NameTableKindField, ); \
OPTIONAL(rangesBaseAddress, MDBoolField, = false); \
OPTIONAL(sysroot, MDStringField, ); \
OPTIONAL(sdk, MDStringField, );
dxil globals

◆ VISIT_MD_FIELDS [13/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
OPTIONAL(scope, MDField, ); \
OPTIONAL(name, MDStringField, ); \
OPTIONAL(linkageName, MDStringField, ); \
OPTIONAL(file, MDField, ); \
OPTIONAL(line, LineField, ); \
OPTIONAL(type, MDField, ); \
OPTIONAL(isLocal, MDBoolField, ); \
OPTIONAL(isDefinition, MDBoolField, (true)); \
OPTIONAL(scopeLine, LineField, ); \
OPTIONAL(containingType, MDField, ); \
OPTIONAL(virtuality, DwarfVirtualityField, ); \
OPTIONAL(virtualIndex, MDUnsignedField, (0, UINT32_MAX)); \
OPTIONAL(thisAdjustment, MDSignedField, (0, INT32_MIN, INT32_MAX)); \
OPTIONAL(flags, DIFlagField, ); \
OPTIONAL(spFlags, DISPFlagField, ); \
OPTIONAL(isOptimized, MDBoolField, ); \
OPTIONAL(unit, MDField, ); \
OPTIONAL(templateParams, MDField, ); \
OPTIONAL(declaration, MDField, ); \
OPTIONAL(retainedNodes, MDField, ); \
OPTIONAL(thrownTypes, MDField, ); \
OPTIONAL(annotations, MDField, ); \
OPTIONAL(targetFuncName, MDStringField, );

◆ VISIT_MD_FIELDS [14/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(scope, MDField, (/* AllowNull */ false)); \
OPTIONAL(file, MDField, ); \
OPTIONAL(line, LineField, ); \
OPTIONAL(column, ColumnField, );

◆ VISIT_MD_FIELDS [15/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(scope, MDField, (/* AllowNull */ false)); \
OPTIONAL(file, MDField, ); \
REQUIRED(discriminator, MDUnsignedField, (0, UINT32_MAX));

◆ VISIT_MD_FIELDS [16/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(scope, MDField, ); \
OPTIONAL(declaration, MDField, ); \
OPTIONAL(name, MDStringField, ); \
OPTIONAL(file, MDField, ); \
OPTIONAL(line, LineField, );

◆ VISIT_MD_FIELDS [17/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(scope, MDField, ); \
OPTIONAL(name, MDStringField, ); \
OPTIONAL(exportSymbols, MDBoolField, );

◆ VISIT_MD_FIELDS [18/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(type, DwarfMacinfoTypeField, ); \
OPTIONAL(line, LineField, ); \
REQUIRED(name, MDStringField, ); \
OPTIONAL(value, MDStringField, );

◆ VISIT_MD_FIELDS [19/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
OPTIONAL(type, DwarfMacinfoTypeField, (dwarf::DW_MACINFO_start_file)); \
OPTIONAL(line, LineField, ); \
REQUIRED(file, MDField, ); \
OPTIONAL(nodes, MDField, );
Unify divergent function exit nodes
@ DW_MACINFO_start_file
Definition: Dwarf.h:798

◆ VISIT_MD_FIELDS [20/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(scope, MDField, ); \
REQUIRED(name, MDStringField, ); \
OPTIONAL(configMacros, MDStringField, ); \
OPTIONAL(includePath, MDStringField, ); \
OPTIONAL(apinotes, MDStringField, ); \
OPTIONAL(file, MDField, ); \
OPTIONAL(line, LineField, ); \
OPTIONAL(isDecl, MDBoolField, );

◆ VISIT_MD_FIELDS [21/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
OPTIONAL(name, MDStringField, ); \
REQUIRED(type, MDField, ); \
OPTIONAL(defaulted, MDBoolField, );

◆ VISIT_MD_FIELDS [22/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
OPTIONAL(tag, DwarfTagField, (dwarf::DW_TAG_template_value_parameter)); \
OPTIONAL(name, MDStringField, ); \
OPTIONAL(type, MDField, ); \
OPTIONAL(defaulted, MDBoolField, ); \
REQUIRED(value, MDField, );

◆ VISIT_MD_FIELDS [23/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
OPTIONAL(name, MDStringField, (/* AllowEmpty */ false)); \
OPTIONAL(scope, MDField, ); \
OPTIONAL(linkageName, MDStringField, ); \
OPTIONAL(file, MDField, ); \
OPTIONAL(line, LineField, ); \
OPTIONAL(type, MDField, ); \
OPTIONAL(isLocal, MDBoolField, ); \
OPTIONAL(isDefinition, MDBoolField, (true)); \
OPTIONAL(templateParams, MDField, ); \
OPTIONAL(declaration, MDField, ); \
OPTIONAL(align, MDUnsignedField, (0, UINT32_MAX)); \
OPTIONAL(annotations, MDField, );

◆ VISIT_MD_FIELDS [24/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(scope, MDField, (/* AllowNull */ false)); \
OPTIONAL(name, MDStringField, ); \
OPTIONAL(arg, MDUnsignedField, (0, UINT16_MAX)); \
OPTIONAL(file, MDField, ); \
OPTIONAL(line, LineField, ); \
OPTIONAL(type, MDField, ); \
OPTIONAL(flags, DIFlagField, ); \
OPTIONAL(align, MDUnsignedField, (0, UINT32_MAX)); \
OPTIONAL(annotations, MDField, );

◆ VISIT_MD_FIELDS [25/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(scope, MDField, (/* AllowNull */ false)); \
REQUIRED(name, MDStringField, ); \
REQUIRED(file, MDField, ); \
REQUIRED(line, LineField, );

◆ VISIT_MD_FIELDS [26/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(var, MDField, ); \
REQUIRED(expr, MDField, );

◆ VISIT_MD_FIELDS [27/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
OPTIONAL(name, MDStringField, ); \
OPTIONAL(file, MDField, ); \
OPTIONAL(line, LineField, ); \
OPTIONAL(setter, MDStringField, ); \
OPTIONAL(getter, MDStringField, ); \
OPTIONAL(attributes, MDUnsignedField, (0, UINT32_MAX)); \
OPTIONAL(type, MDField, );

◆ VISIT_MD_FIELDS [28/28]

#define VISIT_MD_FIELDS (   OPTIONAL,
  REQUIRED 
)
Value:
REQUIRED(tag, DwarfTagField, ); \
REQUIRED(scope, MDField, ); \
OPTIONAL(entity, MDField, ); \
OPTIONAL(file, MDField, ); \
OPTIONAL(line, LineField, ); \
OPTIONAL(name, MDStringField, ); \
OPTIONAL(elements, MDField, );

Function Documentation

◆ createGlobalFwdRef()

static GlobalValue * createGlobalFwdRef ( Module M,
PointerType PTy 
)
inlinestatic

◆ dropIntrinsicWithUnknownMetadataArgument()

static void dropIntrinsicWithUnknownMetadataArgument ( IntrinsicInst II)
static

◆ getTypeString()

static std::string getTypeString ( Type T)
static

Definition at line 71 of file LLParser.cpp.

References llvm::raw_string_ostream::str().

Referenced by StackAccess::print().

◆ isOldDbgFormatIntrinsic()

bool isOldDbgFormatIntrinsic ( StringRef  Name)

Definition at line 6309 of file LLParser.cpp.

References llvm::Intrinsic::lookupIntrinsicID(), and Name.

◆ isSanitizer()

static bool isSanitizer ( lltok::Kind  Kind)
static

◆ isValidDLLStorageClassForLinkage()

static bool isValidDLLStorageClassForLinkage ( unsigned  S,
unsigned  L 
)
static

◆ isValidVisibilityForLinkage()

static bool isValidVisibilityForLinkage ( unsigned  V,
unsigned  L 
)
static

◆ keywordToFPClassTest()

static unsigned keywordToFPClassTest ( lltok::Kind  Tok)
static

◆ keywordToLoc()

static std::optional< MemoryEffects::Location > keywordToLoc ( lltok::Kind  Tok)
static

◆ keywordToModRef()

static std::optional< ModRefInfo > keywordToModRef ( lltok::Kind  Tok)
static

◆ maybeSetDSOLocal()

static void maybeSetDSOLocal ( bool  DSOLocal,
GlobalValue GV 
)
static

Definition at line 1146 of file LLParser.cpp.

References llvm::GlobalValue::setDSOLocal().

◆ parseOptionalLinkageAux()

static unsigned parseOptionalLinkageAux ( lltok::Kind  Kind,
bool HasLinkage 
)
static

◆ resolveFwdRef()

static void resolveFwdRef ( ValueInfo Fwd,
ValueInfo Resolved 
)
static

◆ tokenToAttribute()

static Attribute::AttrKind tokenToAttribute ( lltok::Kind  Kind)
static

Definition at line 1536 of file LLParser.cpp.

References llvm::Attribute::None.

◆ upgradeMemoryAttr()

static bool upgradeMemoryAttr ( MemoryEffects ME,
lltok::Kind  Kind 
)
static

Variable Documentation

◆ AllowIncompleteIR

cl::opt< bool > AllowIncompleteIR("allow-incomplete-ir", cl::init(false), cl::Hidden, cl::desc( "Allow incomplete IR on a best effort basis (references to unknown " "metadata will be dropped)")) ( "allow-incomplete-ir"  ,
cl::init(false)  ,
cl::Hidden  ,
cl::desc( "Allow incomplete IR on a best effort basis (references to unknown " "metadata will be dropped)")   
)
static

◆ EmptyVI

ValueInfo EmptyVI
static
Initial value:
=
ValueInfo(false, (GlobalValueSummaryMapTy::value_type *)-8)
Struct that holds a reference to a particular GUID in a global value summary.

Definition at line 8857 of file LLParser.cpp.

Referenced by llvm::yaml::CustomMappingTraits< GlobalValueSummaryMapTy >::fixAliaseeLinks().

◆ FwdVIRef

const auto FwdVIRef = (GlobalValueSummaryMapTy::value_type *)-8
static

Definition at line 9214 of file LLParser.cpp.

◆ PreserveInputDbgFormat

cl::opt<cl::boolOrDefault> PreserveInputDbgFormat
extern

◆ UseNewDbgInfoFormat

llvm::cl::opt<bool> UseNewDbgInfoFormat
extern

◆ WriteNewDbgInfoFormat

cl::opt<bool> WriteNewDbgInfoFormat
extern

◆ WriteNewDbgInfoFormatToBitcode

bool WriteNewDbgInfoFormatToBitcode
extern