[ORC] Add more information to duplicate section error message.
authorLang Hames <lhames@gmail.com>
Sat, 22 Oct 2022 04:31:32 +0000 (04:31 +0000)
committerLang Hames <lhames@gmail.com>
Sat, 22 Oct 2022 05:03:11 +0000 (05:03 +0000)
Now includes the name of the graph and duplicate section.

llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp

index 1e68ea1..690f6b2 100644 (file)
@@ -370,7 +370,9 @@ Error ELFDebugObject::recordSection(
     return Err;
   auto ItInserted = Sections.try_emplace(Name, std::move(Section));
   if (!ItInserted.second)
-    return make_error<StringError>("Duplicate section",
+    return make_error<StringError>("In " + Buffer->getBufferIdentifier() +
+                                  ", encountered duplicate section \"" +
+                                  Name + "\" while building debug object",
                                    inconvertibleErrorCode());
   return Error::success();
 }