[Openmp-commits] [PATCH] D86397: Move special va_list handling to kmp_os.h

Dimitry Andric via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat Aug 22 06:32:23 PDT 2020


dim created this revision.
dim added reviewers: AndreyChurbanov, emaste, jdoerfert, jlpeyton, protze.joachim.
Herald added subscribers: aaron.ballman, krytarowski, arichardson.
Herald added a project: OpenMP.
dim requested review of this revision.
Herald added a subscriber: sstefan1.

Instead of copying and pasting the same `#ifdef` expressions in multiple
places, define a type and a pair of macros in `kmp_os.h`, to handle
whether `va_list` is pointer-like or not:

- `kmp_va_list` is the type to use for `__kmp_fork_call()`
- `kmp_va_deref()` dereferences a `va_list`, if necessary
- `kmp_va_addr_of()` takes the address of a `va_list`, if necessary

Also add FreeBSD to the list of OSes that has a non pointer-like
va_list. This can now be easily extended to other OSes too.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86397

Files:
  openmp/runtime/src/kmp.h
  openmp/runtime/src/kmp_csupport.cpp
  openmp/runtime/src/kmp_gsupport.cpp
  openmp/runtime/src/kmp_os.h
  openmp/runtime/src/kmp_runtime.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86397.287179.patch
Type: text/x-patch
Size: 6498 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200822/81559ab7/attachment.bin>


More information about the Openmp-commits mailing list