[PATCH] D110129: [DebugInfo] Support typedef with btf_tag attributes

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 21 07:09:58 PDT 2021


probinson added inline comments.


================
Comment at: clang/test/CodeGen/attr-btf_tag-typedef.c:2
+// REQUIRES: x86-registered-target
+// RUN: %clang -target x86_64 -g -S -emit-llvm -o - %s | FileCheck %s
+
----------------
Outside of clang/test/Driver, tests should use `%clang_cc1` to run the frontend directly instead of via the driver.  This will require some minor adjustment to the command-line options, for example `-target` becomes `-triple` and `-g` generally becomes `-debug-info-kind=limited`.

Also, the `x86_64` triple will do the wrong thing on a Windows host.  You probably want `%itanium_abi_triple` there.


================
Comment at: llvm/test/Bitcode/attr-btf_tag-typedef.ll:1
+; REQUIRES: x86-registered-target
+; RUN: llvm-as < %s | llvm-dis | FileCheck %s
----------------
Does this really require a specific target?  I don't see anything target-dependent in the test.


================
Comment at: llvm/test/DebugInfo/attr-btf_tag-typedef.ll:1
+; REQUIRES: x86-registered-target
+; RUN: llc -filetype=obj -o %t %s
----------------
Move this test to llvm/test/DebugInfo/X86 and remove the REQUIRES line.


================
Comment at: llvm/test/DebugInfo/attr-btf_tag-typedef.ll:2
+; REQUIRES: x86-registered-target
+; RUN: llc -filetype=obj -o %t %s
+; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s
----------------
Use `%itanium_abi_triple` so the test will work correctly on Windows.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110129



More information about the cfe-commits mailing list