diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2021-04-26 11:23:24 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2021-06-13 20:01:15 +0000 |
commit | d409305fa3838fb39b38c26fc085fb729b8766d5 (patch) | |
tree | fd234b27775fb59a57266cf36a05ec916e79a85f /contrib/llvm-project/clang/lib/CodeGen/CGCUDANV.cpp | |
parent | e8d8bef961a50d4dc22501cde4fb9fb0be1b2532 (diff) | |
parent | b4125f7d51da2bb55d3b850dba9a69c201c3422c (diff) | |
download | src-d409305fa3838fb39b38c26fc085fb729b8766d5.tar.gz src-d409305fa3838fb39b38c26fc085fb729b8766d5.zip |
Merge llvm-project 12.0.0 release
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.0-0-gd28af7c654d8, a.k.a. 12.0.0 release.
PR: 255570
MFC after: 6 weeks
Diffstat (limited to 'contrib/llvm-project/clang/lib/CodeGen/CGCUDANV.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/CodeGen/CGCUDANV.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCUDANV.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCUDANV.cpp index 33a2d6f4483e..e03631a7243a 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCUDANV.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCUDANV.cpp @@ -184,6 +184,14 @@ CGNVCUDARuntime::CGNVCUDARuntime(CodeGenModule &CGM) CharPtrTy = llvm::PointerType::getUnqual(Types.ConvertType(Ctx.CharTy)); VoidPtrTy = cast<llvm::PointerType>(Types.ConvertType(Ctx.VoidPtrTy)); VoidPtrPtrTy = VoidPtrTy->getPointerTo(); + if (CGM.getContext().getAuxTargetInfo()) { + // If the host and device have different C++ ABIs, mark it as the device + // mangle context so that the mangling needs to retrieve the additonal + // device lambda mangling number instead of the regular host one. + DeviceMC->setDeviceMangleContext( + CGM.getContext().getTargetInfo().getCXXABI().isMicrosoft() && + CGM.getContext().getAuxTargetInfo()->getCXXABI().isItaniumFamily()); + } } llvm::FunctionCallee CGNVCUDARuntime::getSetupArgumentFn() const { |