[PATCH] D56113: [OpenMP] Replace predetermined shared for const variable

Joel E. Denny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 3 12:52:51 PST 2019


jdenny added a comment.

In D56113#1345578 <https://reviews.llvm.org/D56113#1345578>, @ABataev wrote:

> >>> By the way, LangOpts.OpenMP currently defaults to 0.  Should it?
> >> 
> >> Yes, it means it is disabled by default.
> > 
> > Ah, it becomes 1 when we have `-fopenmp` but not `-fopenmp-version`.  But still `LangOpts.OpenMP <= 31` is true by default, so the new behavior would be off by default.
>
> No, by default it gets value 31.


In `DSAStackTy::getTopDSA` in SemaOpenMP.cpp, I added this line:

  llvm::errs() << SemaRef.LangOpts.OpenMP << '\n';

`clang -fopenmp test.c` prints 1.

I'm at r350238, which I pulled yesterday.

For my purposes, 1 and 31 are equivalent, so I can move on.

> If -fopenmp-targets= is used, then the default version is 45.

That I can confirm.


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

https://reviews.llvm.org/D56113





More information about the cfe-commits mailing list