[PATCH] D81686: [yaml2obj][MachO] - Fix PubName/PubType handling.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 12 02:08:19 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGd95f8e7aef79: [yaml2obj][MachO] - Fix PubName/PubType handling. (authored by grimar).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81686/new/

https://reviews.llvm.org/D81686

Files:
  llvm/lib/Support/YAMLTraits.cpp
  llvm/test/ObjectYAML/MachO/DWARF-pubsections.yaml


Index: llvm/test/ObjectYAML/MachO/DWARF-pubsections.yaml
===================================================================
--- llvm/test/ObjectYAML/MachO/DWARF-pubsections.yaml
+++ llvm/test/ObjectYAML/MachO/DWARF-pubsections.yaml
@@ -356,7 +356,8 @@
 ## contents, if the "debug_pubnames"/"debug_pubtypes" entry doesn't exist in the
 ## "DWARF" entry.
 
-# RUN: yaml2obj --docnum=2 %s | obj2yaml | FileCheck %s --check-prefix=EMPTY
+# RUN: yaml2obj --docnum=2 %s -o %t2
+# RUN: obj2yaml %t2 | FileCheck %s --check-prefix=EMPTY
 
 #      EMPTY: Sections:
 # EMPTY-NEXT:   - sectname:        __debug_pubnames
@@ -394,7 +395,7 @@
   cpusubtype: 0x00000003
   filetype:   0x0000000A
   ncmds:      1
-  sizeofcmds: 1800
+  sizeofcmds: 1772
   flags:      0x00000000
   reserved:   0x00000000
 LoadCommands:
Index: llvm/lib/Support/YAMLTraits.cpp
===================================================================
--- llvm/lib/Support/YAMLTraits.cpp
+++ llvm/lib/Support/YAMLTraits.cpp
@@ -166,6 +166,8 @@
   if (!MN) {
     if (Required || !isa<EmptyHNode>(CurrentNode))
       setError(CurrentNode, "not a mapping");
+    else
+      UseDefault = true;
     return false;
   }
   MN->ValidKeys.push_back(Key);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81686.270332.patch
Type: text/x-patch
Size: 1210 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200612/f3181f4a/attachment.bin>


More information about the llvm-commits mailing list