Lines Matching defs:Error
89 bool error(const SMDiagnostic &Error, SMRange SourceRange);
173 SMDiagnostic diagFromMIStringDiag(const SMDiagnostic &Error,
178 SMDiagnostic diagFromBlockStringDiag(const SMDiagnostic &Error,
216 bool MIRParserImpl::error(const SMDiagnostic &Error, SMRange SourceRange) {
217 assert(Error.getKind() == SourceMgr::DK_Error && "Expected an error");
218 reportDiagnostic(diagFromMIStringDiag(Error, SourceRange));
260 SMDiagnostic Error;
261 M = parseAssembly(MemoryBufferRef(BSN->getValue(), Filename), Error,
264 reportDiagnostic(diagFromBlockStringDiag(Error, BSN->getSourceRange()));
421 SMDiagnostic Error;
445 if (parseNamedRegisterReference(PFS, Reg, ArgRegPair.Reg.Value, Error))
446 return error(Error, ArgRegPair.Reg.SourceRange);
531 SMDiagnostic Error;
537 if (parseMachineBasicBlockDefinitions(PFS, BlockStr, Error)) {
539 diagFromBlockStringDiag(Error, YamlMF.Body.Value.SourceRange));
567 if (parseMachineInstructions(PFS, InsnStr, Error)) {
569 diagFromBlockStringDiag(Error, YamlMF.Body.Value.SourceRange));
584 if (TM.parseMachineFunctionInfo(*YamlMF.MachineFuncInfo, PFS, Error,
586 return error(Error, SrcRange);
619 SMDiagnostic Error;
655 VReg.PreferredRegister.Value, Error))
656 return error(Error, VReg.PreferredRegister.SourceRange);
663 if (parseNamedRegisterReference(PFS, Reg, LiveIn.Register.Value, Error))
664 return error(Error, LiveIn.Register.SourceRange);
669 Error))
670 return error(Error, LiveIn.VirtualRegister.SourceRange);
682 if (parseNamedRegisterReference(PFS, Reg, RegSource.Value, Error))
683 return error(Error, RegSource.SourceRange);
698 bool Error = false;
706 Error = true;
713 Error = true;
755 return Error;
826 SMDiagnostic Error;
829 Error))
830 return error(Error, Object.EntryValueRegister.SourceRange);
890 SMDiagnostic Error;
892 if (parseStackObjectReference(PFS, FI, YamlMFI.StackProtector.Value, Error))
893 return error(Error, YamlMFI.StackProtector.SourceRange);
898 SMDiagnostic Error;
900 if (parseStackObjectReference(PFS, FI, YamlMFI.FunctionContext.Value, Error))
901 return error(Error, YamlMFI.FunctionContext.SourceRange);
914 SMDiagnostic Error;
915 if (parseNamedRegisterReference(PFS, Reg, RegisterSource.Value, Error))
916 return error(Error, RegisterSource.SourceRange);
976 SMDiagnostic Error;
977 if (llvm::parseMDNode(PFS, Node, Source.Value, Error))
978 return error(Error, Source.SourceRange);
987 SMDiagnostic Error;
994 parseConstantValue(YamlConstant.Value.Value, Error, M));
996 return error(Error, YamlConstant.Value.SourceRange);
1034 SMDiagnostic Error;
1035 if (llvm::parseMBBReference(PFS, MBB, Source.Value, Error))
1036 return error(Error, Source.SourceRange);
1042 SMDiagnostic Error;
1043 if (llvm::parseMachineMetadata(PFS, Source.Value, Source.SourceRange, Error))
1044 return error(Error, Source.SourceRange);
1063 SMDiagnostic MIRParserImpl::diagFromMIStringDiag(const SMDiagnostic &Error,
1071 Loc = Loc.getFromPointer(Loc.getPointer() + Error.getColumnNo() +
1075 return SM.GetMessage(Loc, Error.getKind(), Error.getMessage(), std::nullopt,
1076 Error.getFixIts());
1079 SMDiagnostic MIRParserImpl::diagFromBlockStringDiag(const SMDiagnostic &Error,
1086 unsigned Line = LineAndColumn.first + Error.getLineNo() - 1;
1087 unsigned Column = Error.getColumnNo();
1088 StringRef LineStr = Error.getLineContents();
1089 SMLoc Loc = Error.getLoc();
1098 auto Indent = LineStr.find(Error.getLineContents());
1105 return SMDiagnostic(SM, Loc, Filename, Line, Column, Error.getKind(),
1106 Error.getMessage(), LineStr, Error.getRanges(),
1107 Error.getFixIts());
1130 StringRef Filename, SMDiagnostic &Error, LLVMContext &Context,
1134 Error = SMDiagnostic(Filename, SourceMgr::DK_Error,