MCPcopy Create free account
hub / github.com/beefytech/Beef / ProcessBfIRData

Method ProcessBfIRData

IDEHelper/Compiler/BfIRCodeGen.cpp:876–908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

874}
875
876void BfIRCodeGen::ProcessBfIRData(const BfSizedArray<uint8>& buffer)
877{
878 // Diagnostic handlers were unified in LLVM change 5de2d189e6ad, so starting
879 // with LLVM 13 this function is gone.
880 /*struct InlineAsmErrorHook
881 {
882 static void StaticHandler(const llvm::SMDiagnostic& diag, void *context, unsigned locCookie)
883 {
884 if (diag.getKind() == llvm::SourceMgr::DK_Error)
885 {
886 BfIRCodeGen* irCodeGen = (BfIRCodeGen*)context;
887
888 if (!irCodeGen->mErrorMsg.empty())
889 irCodeGen->mErrorMsg += "\n";
890 irCodeGen->mErrorMsg += StrFormat("Inline assembly error: \"%s\" : %s", diag.getMessage().data(), diag.getLineContents().data());
891 }
892 }
893 };
894 mLLVMContext->setInlineAsmDiagnosticHandler(InlineAsmErrorHook::StaticHandler, this);*/
895
896 BF_ASSERT(mStream == NULL);
897 mStream = new ChunkedDataBuffer();
898 mStream->InitFlatRef(buffer.mVals, buffer.mSize);
899
900 while (mStream->GetReadPos() < buffer.mSize)
901 {
902 if (mFailed)
903 break;
904 HandleNextCmd();
905 }
906
907 BF_ASSERT((mFailed) || (mStream->GetReadPos() == buffer.mSize));
908}
909
910int64 BfIRCodeGen::ReadSLEB128()
911{

Callers 1

RunLoopMethod · 0.45

Calls 2

InitFlatRefMethod · 0.80
GetReadPosMethod · 0.80

Tested by

no test coverage detected