[PATCH] D145848: [Driver] Correct -f(no-)xray-function-index behavior

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 11 23:05:31 PST 2023


MaskRay requested changes to this revision.
MaskRay added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/test/CodeGen/xray-function-index.cpp:1
+// RUN: %clang_cc1 -fxray-instrument                          -x c++ -std=c++11 -triple x86_64-unknown-linux-gnu -S -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-ENABLED
+// RUN: %clang_cc1 -fxray-instrument -fno-xray-function-index -x c++ -std=c++11 -triple x86_64-unknown-linux-gnu -S -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-DISABLED
----------------
Add `// REQUIRES: x86-registered-target`


================
Comment at: clang/test/CodeGen/xray-function-index.cpp:8
+// CHECK-ENABLED: .section xray_fn_idx,"awo", at progbits,_Z3foov
+// CHECK-DISABLED-NOT: xray_fn_idx
----------------
`.section xray_fn_idx`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145848



More information about the cfe-commits mailing list