[lld] [llvm] [llvm-readobj][ELF] Alter JSON/LLVM output on note sections to allow for multiple notes per section in JSON (PR #96813)

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 08:43:59 PDT 2024


================
@@ -19,46 +19,52 @@
 // LLVM-NEXT:     Name: .note.foo
 // LLVM-NEXT:     Offset: 0x40
 // LLVM-NEXT:     Size: 0x10
-// LLVM-NEXT:     Note {
-// LLVM-NEXT:       Owner: XYZ
-// LLVM-NEXT:       Data size: 0x0
-// LLVM-NEXT:       Type: Unknown (0x00000003)
-// LLVM-NEXT:     }
+// LLVM-NEXT:	  Notes [
+// LLVM-NEXT:		{
+// LLVM-NEXT:			Owner: XYZ
+// LLVM-NEXT:			Data size: 0x0
+// LLVM-NEXT:			Type: Unknown (0x00000003)
+// LLVM-NEXT:		}
+// LLVM-NEXT:	  ]
 // LLVM-NEXT:   }
 // LLVM-NEXT:   NoteSection {
 // LLVM-NEXT:     Name: .note.bar
 // LLVM-NEXT:     Offset: 0x50
 // LLVM-NEXT:     Size: 0x2C
-// LLVM-NEXT:     Note {
-// LLVM-NEXT:       Owner: XYZ
-// LLVM-NEXT:       Data size: 0x1C
-// LLVM-NEXT:       Type: Unknown (0x00000003)
-// LLVM-NEXT:       Description data (
-// LLVM-NEXT:         0000: 4C6F7265 6D206970 73756D20 646F6C6F  |Lorem ipsum dolo|
-// LLVM-NEXT:         0010: 72207369 7420616D 65740000           |r sit amet..|
-// LLVM-NEXT:       )
-// LLVM-NEXT:     }
+// LLVM-NEXT:	  Notes [
+// LLVM-NEXT:		{
+// LLVM-NEXT:			Owner: XYZ
+// LLVM-NEXT:			Data size: 0x1C
+// LLVM-NEXT:			Type: Unknown (0x00000003)
+// LLVM-NEXT:			Description data (
+// LLVM-NEXT:				0000: 4C6F7265 6D206970 73756D20 646F6C6F  |Lorem ipsum dolo|
+// LLVM-NEXT:				0010: 72207369 7420616D 65740000           |r sit amet..|
+// LLVM-NEXT:			)
+// LLVM-NEXT:		}
+// LLVM-NEXT:	 ]
----------------
ilovepi wrote:

Is this indentation correct?  I thought we used  2 space indentation for the LLVM style, but these appear to use  tabs now... that seems like a regression, IMO. This also only seems to happen w/ the LLVM output, though I'm not sure why, based on the code changes I see.

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


More information about the llvm-commits mailing list