File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,8 @@ class MachODebugMapParser {
113
113
StringRef BinaryPath);
114
114
115
115
void Warning (const Twine &Msg, StringRef File = StringRef()) {
116
+ assert (Result &&
117
+ " The debug map must be initialized before calling this function" );
116
118
WithColor::warning () << " ("
117
119
<< MachOUtils::getArchName (
118
120
Result->getTriple ().getArchName ())
@@ -199,10 +201,9 @@ static std::string getArchName(const object::MachOObjectFile &Obj) {
199
201
std::unique_ptr<DebugMap>
200
202
MachODebugMapParser::parseOneBinary (const MachOObjectFile &MainBinary,
201
203
StringRef BinaryPath) {
204
+ Result = std::make_unique<DebugMap>(MainBinary.getArchTriple (), BinaryPath,
205
+ MainBinary.getUuid ());
202
206
loadMainBinarySymbols (MainBinary);
203
- ArrayRef<uint8_t > UUID = MainBinary.getUuid ();
204
- Result =
205
- std::make_unique<DebugMap>(MainBinary.getArchTriple (), BinaryPath, UUID);
206
207
MainBinaryStrings = MainBinary.getStringTableData ();
207
208
for (const SymbolRef &Symbol : MainBinary.symbols ()) {
208
209
const DataRefImpl &DRI = Symbol.getRawDataRefImpl ();
You can’t perform that action at this time.
0 commit comments