aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/AsmParser/Parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/AsmParser/Parser.h')
-rw-r--r--include/llvm/AsmParser/Parser.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/llvm/AsmParser/Parser.h b/include/llvm/AsmParser/Parser.h
index 96a15c1ec45c..768b089b8a2a 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