Dmitry Vyukov via llvm-dev
2017-Jun-20 06:15 UTC
[llvm-dev] question about clang ast for tsan
On Mon, Jun 19, 2017 at 11:57 PM, Tong Chen <chentong at us.ibm.com> wrote:> Hi, > > I am working xlflang project, which translates other compiler's Fortran > frontend to generate AST for clang. It works fine except for tsan > (-fsanitize=thread). I did not see any instructmentation cod in .ll file. I > experimented with c program by generating .ast file first and then compiling > to executable. It turned out that I have to use -fsanitize=thread flag when > generating the .ast file. So what need to be done for tsan in ast > generation?+llvm-dev mailing list Hi Tong, Tsan instrumentation is done by llvm pass for functions marked with sanitize_thread attribute. Do you see sanitize_thread attribute on generated llvm asm? If no, then that's the problem. What do you do with ast files? Do you pass them to clang? Do you add -fsanitize=thread when invoking clang?