MCPcopy Create free account
hub / github.com/GANGE666/xVMP / readTriple

Function readTriple

src/lib/Bitcode/Reader/BitcodeReader.cpp:347–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347static Expected<std::string> readTriple(BitstreamCursor &Stream) {
348 // We expect a number of well-defined blocks, though we don't necessarily
349 // need to understand them all.
350 while (true) {
351 BitstreamEntry Entry = Stream.advance();
352
353 switch (Entry.Kind) {
354 case BitstreamEntry::Error:
355 return error("Malformed block");
356 case BitstreamEntry::EndBlock:
357 return "";
358
359 case BitstreamEntry::SubBlock:
360 if (Entry.ID == bitc::MODULE_BLOCK_ID)
361 return readModuleTriple(Stream);
362
363 // Ignore other sub-blocks.
364 if (Stream.SkipBlock())
365 return error("Malformed block");
366 continue;
367
368 case BitstreamEntry::Record:
369 Stream.skipRecord(Entry.ID);
370 continue;
371 }
372 }
373}
374
375namespace {
376

Callers 1

Calls 5

readModuleTripleFunction · 0.85
SkipBlockMethod · 0.80
skipRecordMethod · 0.80
errorFunction · 0.70
advanceMethod · 0.45

Tested by

no test coverage detected