diff options
Diffstat (limited to 'include/llvm/AsmParser/Parser.h')
-rw-r--r-- | include/llvm/AsmParser/Parser.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/llvm/AsmParser/Parser.h b/include/llvm/AsmParser/Parser.h index 96a15c1ec45c3..768b089b8a2a6 100644 --- a/include/llvm/AsmParser/Parser.h +++ b/include/llvm/AsmParser/Parser.h @@ -23,6 +23,7 @@ class LLVMContext; class Module; struct SlotMapping; class SMDiagnostic; +class Type; /// This function is the main interface to the LLVM Assembly Parser. It parses /// an ASCII file that (presumably) contains LLVM Assembly code. It returns a @@ -91,6 +92,24 @@ bool parseAssemblyInto(MemoryBufferRef F, Module &M, SMDiagnostic &Err, Constant *parseConstantValue(StringRef Asm, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots = nullptr); +/// Parse a type in the given string. +/// +/// \param Slots The optional slot mapping that will restore the parsing state +/// of the module. +/// \return null on error. +Type *parseType(StringRef Asm, SMDiagnostic &Err, const Module &M, + const SlotMapping *Slots = nullptr); + +/// Parse a string \p Asm that starts with a type. +/// \p Read[out] gives the number of characters that have been read to parse +/// the type in \p Asm. +/// +/// \param Slots The optional slot mapping that will restore the parsing state +/// of the module. +/// \return null on error. +Type *parseTypeAtBeginning(StringRef Asm, unsigned &Read, SMDiagnostic &Err, + const Module &M, const SlotMapping *Slots = nullptr); + } // End llvm namespace #endif |