[llvm] Allow for mixing source/no-source DIFiles in one CU (PR #73877)

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 12:39:17 PST 2023


================
@@ -170,9 +170,14 @@ void DWARFDebugLine::Prologue::dump(raw_ostream &OS,
       if (ContentTypes.HasLength)
         OS << format("         length: 0x%8.8" PRIx64 "\n", FileEntry.Length);
       if (ContentTypes.HasSource) {
-        OS <<        "         source: ";
-        FileEntry.Source.dump(OS, DumpOptions);
-        OS << '\n';
+        auto Source = FileEntry.Source.getAsCString();
+        if (!Source)
+          consumeError(Source.takeError());
+        else if (*Source && (*Source)[0]) {
----------------
adrian-prantl wrote:

I'll remove the safety check.

https://github.com/llvm/llvm-project/pull/73877


More information about the llvm-commits mailing list