[PATCH] D73842: [xray][clang] Always add xray-skip-entry/exit and xray-ignore-loops attrs

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 11 08:54:12 PST 2020


smeenai added a comment.

Is it worth adding a test that a function with an explicit xray-instrument attribute also has these other attributes applied?



================
Comment at: clang/test/CodeGen/xray-attributes-skip-entry-exit.cpp:8
+// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \
+// RUN:     | FileCheck --check-prefixes CHECK,NOCUSTOM,NOTYPED,SKIPENTRY %s
+// RUN: %clang_cc1 -fxray-instrument \
----------------
I don't see the NOCUSTOM or NOTYPED prefixes defined?


================
Comment at: clang/test/CodeGen/xray-attributes-skip-entry-exit.cpp:12
+// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \
+// RUN:     | FileCheck --check-prefixes CHECK,FUNCTION,NOCUSTOM,NOTYPED %s
+
----------------
Same with the FUNCTION prefix.


================
Comment at: clang/test/CodeGen/xray-ignore-loops.cpp:2
 // RUN: %clang_cc1 -fxray-instrument -fxray-ignore-loops -x c++ -std=c++11 -emit-llvm -o - %s -triple x86_64-unknown-linux-gnu | FileCheck %s
+// RUN: %clang -fxray-instrument -fxray-ignore-loops -x c++ -std=c++11 -S -emit-llvm -o - %s -target x86_64-unknown-linux-gnu | FileCheck %s
 
----------------
>From what I've seen, CodeGen tests don't usually invoke the driver directly. They have a test that the driver passes the correct flags to cc1 (as you do below), and then they just test that cc1 does the right thing with that flag.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73842





More information about the cfe-commits mailing list