[PATCH] D129709: [clang][CodeGen] add fn_ret_thunk_extern to synthetic fns

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 11:37:42 PDT 2022


MaskRay added inline comments.


================
Comment at: clang/test/CodeGen/attr-function-return.c:9
 // RUN:  --check-prefixes=CHECK,CHECK-EXTERN
+// RUN: %clang_cc1 -std=gnu2x -triple x86_64-linux-gnu %s -emit-llvm -o - \
+// RUN:  -mfunction-return=thunk-extern -fprofile-arcs \
----------------
nickdesaulniers wrote:
> MaskRay wrote:
> > nickdesaulniers wrote:
> > > MaskRay wrote:
> > > > I feel that having 3 RUN lines is excessive. Since we already have a test that asan/tsan/gcov respect getModuleFlag, it is not necessary for a new one to duplicate all the combinations.
> > > All three have caused problems for us; I'd prefer to retain each.
> > Having asan/tsan may invite others to add more sanitizer tests to this not-so-related file. I can step back and think that gcov/asan are sufficient.
> If such sanitizers produce synthetic functions, we should add them to this file.
No. The sanitizers should pick a dedicated test file and be added there, if the use case is important enough.

Today we have -mfunction-return=thunk-extern, tomorrow we can have -mfoobar. We should not add `{-mfunction-return=thunk-extern,-mfoobar} * {-fsanitize=address,-fsanitize=thread,...}` for every combination.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129709



More information about the llvm-commits mailing list