Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
Show First 20 Lines • Show All 351 Lines • ▼ Show 20 Lines | Error TypeStreamMerger::doit(const CVTypeArray &Types) { | ||||
if (LastError) | if (LastError) | ||||
return std::move(*LastError); | return std::move(*LastError); | ||||
return Error::success(); | return Error::success(); | ||||
} | } | ||||
Error TypeStreamMerger::remapAllTypes(const CVTypeArray &Types) { | Error TypeStreamMerger::remapAllTypes(const CVTypeArray &Types) { | ||||
BinaryStreamRef Stream = Types.getUnderlyingStream(); | BinaryStreamRef Stream = Types.getUnderlyingStream(); | ||||
ArrayRef<uint8_t> Buffer; | ArrayRef<uint8_t> Buffer; | ||||
cantFail(Stream.readBytes(0, Stream.getLength(), Buffer)); | llvm_cantFail(Stream.readBytes(0, Stream.getLength(), Buffer)); | ||||
return forEachCodeViewRecord<CVType>( | return forEachCodeViewRecord<CVType>( | ||||
Buffer, [this](const CVType &T) { return remapType(T); }); | Buffer, [this](const CVType &T) { return remapType(T); }); | ||||
} | } | ||||
Error TypeStreamMerger::remapType(const CVType &Type) { | Error TypeStreamMerger::remapType(const CVType &Type) { | ||||
auto R = shouldRemapType(Type); | auto R = shouldRemapType(Type); | ||||
if (!R) | if (!R) | ||||
▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines |