LLVM 20.0.0git
Classes | Namespaces | Typedefs | Functions
Parser.h File Reference
#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/ADT/StringRef.h"
#include <memory>
#include <optional>

Go to the source code of this file.

Classes

struct  llvm::ParsedModuleAndIndex
 Holds the Module and ModuleSummaryIndex returned by the interfaces that parse both. More...
 

Namespaces

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

Typedefs

typedef llvm::function_ref< std::optional< std::string >(StringRef, StringRef)> llvm::DataLayoutCallbackTy
 

Functions

std::unique_ptr< Modulellvm::parseAssemblyFile (StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr)
 This function is a main interface to the LLVM Assembly Parser.
 
std::unique_ptr< Modulellvm::parseAssemblyString (StringRef AsmString, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr)
 The function is a secondary interface to the LLVM Assembly Parser.
 
ParsedModuleAndIndex llvm::parseAssemblyFileWithIndex (StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, DataLayoutCallbackTy DataLayoutCallback=[](StringRef, StringRef) { return std::nullopt;})
 This function is a main interface to the LLVM Assembly Parser.
 
ParsedModuleAndIndex llvm::parseAssemblyFileWithIndexNoUpgradeDebugInfo (StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots, DataLayoutCallbackTy DataLayoutCallback)
 Only for use in llvm-as for testing; this does not produce a valid module.
 
std::unique_ptr< ModuleSummaryIndexllvm::parseSummaryIndexAssemblyFile (StringRef Filename, SMDiagnostic &Err)
 This function is a main interface to the LLVM Assembly Parser.
 
std::unique_ptr< ModuleSummaryIndexllvm::parseSummaryIndexAssemblyString (StringRef AsmString, SMDiagnostic &Err)
 The function is a secondary interface to the LLVM Assembly Parser.
 
std::unique_ptr< Modulellvm::parseAssembly (MemoryBufferRef F, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, DataLayoutCallbackTy DataLayoutCallback=[](StringRef, StringRef) { return std::nullopt;})
 parseAssemblyFile and parseAssemblyString are wrappers around this function.
 
ParsedModuleAndIndex llvm::parseAssemblyWithIndex (MemoryBufferRef F, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr)
 Parse LLVM Assembly including the summary index from a MemoryBuffer.
 
std::unique_ptr< ModuleSummaryIndexllvm::parseSummaryIndexAssembly (MemoryBufferRef F, SMDiagnostic &Err)
 Parse LLVM Assembly for summary index from a MemoryBuffer.
 
bool llvm::parseAssemblyInto (MemoryBufferRef F, Module *M, ModuleSummaryIndex *Index, SMDiagnostic &Err, SlotMapping *Slots=nullptr, DataLayoutCallbackTy DataLayoutCallback=[](StringRef, StringRef) { return std::nullopt;})
 This function is the low-level interface to the LLVM Assembly Parser.
 
Constantllvm::parseConstantValue (StringRef Asm, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots=nullptr)
 Parse a type and a constant value in the given string.
 
Typellvm::parseType (StringRef Asm, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots=nullptr)
 Parse a type in the given string.
 
Typellvm::parseTypeAtBeginning (StringRef Asm, unsigned &Read, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots=nullptr)
 Parse a string Asm that starts with a type.
 
DIExpressionllvm::parseDIExpressionBodyAtBeginning (StringRef Asm, unsigned &Read, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots)