[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

Azat Khuzhin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 15 12:08:59 PDT 2022


azat marked 2 inline comments as done.
azat added inline comments.


================
Comment at: clang/test/Driver/debug-options-aranges.c:7
+// RUN: %clang -### -g -target x86_64-linux -flto=thin -fuse-ld=lld -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=PLUGIN_GARANGE %s
+// GARANGE: -generate-arange-section
+// PLUGIN_GARANGE: --plugin-opt=-generate-arange-section
----------------
probinson wrote:
> I don't see any FileCheck commands that use prefix GARANGE.
Indeed, that was a leftover. Removed.


================
Comment at: clang/test/Driver/debug-options-aranges.c:15
+// RUN: %clang -g -target x86_64-linux -flto=thin -fuse-ld=lld -gdwarf-aranges %s -o - | llvm-dwarfdump --debug-aranges - | FileCheck -check-prefix=ARANGES %s
+// ARANGES: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00
+
----------------
dblaikie wrote:
> Generally Clang tests don't test the LLVM behavior - this test should probably just check how -gdwarf-aranges is passed to the linker. Other linker-level tests will test that, given that flag, the linker does the right thing.
Okay, removed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133875



More information about the cfe-commits mailing list