[all-commits] [llvm/llvm-project] cde8f4: Move special va_list handling to kmp_os.h

Dimitry Andric via All-commits all-commits at lists.llvm.org
Mon Aug 24 13:32:24 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cde8f4c164a27670ebe60a1969d486393336d778
      https://github.com/llvm/llvm-project/commit/cde8f4c164a27670ebe60a1969d486393336d778
  Author: Dimitry Andric <dimitry at andric.com>
  Date:   2020-08-24 (Mon, 24 Aug 2020)

  Changed paths:
    M openmp/runtime/src/kmp.h
    M openmp/runtime/src/kmp_csupport.cpp
    M openmp/runtime/src/kmp_gsupport.cpp
    M openmp/runtime/src/kmp_os.h
    M openmp/runtime/src/kmp_runtime.cpp

  Log Message:
  -----------
  Move special va_list handling to kmp_os.h

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.

Reviewed By: AndreyChurbanov

Differential Revision: https://reviews.llvm.org/D86397




More information about the All-commits mailing list