diff options
author | Mike Rice <michael.p.rice@intel.com> | 2022-05-25 15:02:26 -0700 |
---|---|---|
committer | Mike Rice <michael.p.rice@intel.com> | 2022-05-26 09:51:48 -0700 |
commit | 0a5cfbf7b2e82e7980b66428e88b4e28e814d7bb (patch) | |
tree | 57227909327184f7826c14532e158542d47a1cd5 /clang/lib/CodeGen/CodeGenModule.h | |
parent | 939a43461ba3cd540a049a62a27dab2732bedd64 (diff) | |
download | llvm-0a5cfbf7b2e82e7980b66428e88b4e28e814d7bb.zip llvm-0a5cfbf7b2e82e7980b66428e88b4e28e814d7bb.tar.gz llvm-0a5cfbf7b2e82e7980b66428e88b4e28e814d7bb.tar.bz2 |
[OpenMP] Use the align clause value from 'omp allocate' for globals
Refactor the code that handles the align clause of 'omp allocate' so
it can be used with globals as well as local variables.
Differential Revision: https://reviews.llvm.org/D126426
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index a5ec4c8..0ac476d 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -1365,6 +1365,9 @@ public: /// \param D The allocate declaration void EmitOMPAllocateDecl(const OMPAllocateDecl *D); + /// Return the alignment specified in an allocate directive, if present. + llvm::Optional<CharUnits> getOMPAllocateAlignment(const VarDecl *VD); + /// Returns whether the given record has hidden LTO visibility and therefore /// may participate in (single-module) CFI and whole-program vtable /// optimization. |