From dafed5d7d82613ca153c1bee70addb17d6d20c3a Mon Sep 17 00:00:00 2001 From: Quentin Colombet Date: Tue, 8 Mar 2016 00:37:07 +0000 Subject: [AsmParser] Expose an API to parse a string starting with a type. Without actually parsing a type it is difficult to perdict where the type definition ends. In other words, instead of expecting the user of the parser API to hand over only the relevant bits of the string being parsed, take the whole string, parse the type, and get back the number of characters that have been read. This will be used by the MIR testing infrastructure. llvm-svn: 262884 --- llvm/lib/AsmParser/LLParser.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/AsmParser/LLParser.h') diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h index 4128fa367f5..96f864a7f1a 100644 --- a/llvm/lib/AsmParser/LLParser.h +++ b/llvm/lib/AsmParser/LLParser.h @@ -148,7 +148,8 @@ namespace llvm { bool parseStandaloneConstantValue(Constant *&C, const SlotMapping *Slots); - bool parseStandaloneType(Type *&Ty, const SlotMapping *Slots); + bool parseTypeAtBeginning(Type *&Ty, unsigned &Read, + const SlotMapping *Slots); LLVMContext &getContext() { return Context; } -- cgit v1.2.3