diff --git a/build.sh b/build.sh index 658ded480..8fc829ce1 100755 --- a/build.sh +++ b/build.sh @@ -77,7 +77,8 @@ build_llvm() -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=install \ -DBUILD_SHARED_LIBS=ON \ - -DLLVM_TARGETS_TO_BUILD="X86" + -DLLVM_TARGETS_TO_BUILD="X86" \ + -DLLVM_BINUTILS_INCDIR=/usr/include fi make -j `nproc` install install-clang rm -rf "../$RELEASE_NAME" diff --git a/llvm-4.0.0.src/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h b/llvm-4.0.0.src/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h index 8647db56c..6faf5a3ec 100644 --- a/llvm-4.0.0.src/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h +++ b/llvm-4.0.0.src/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h @@ -687,8 +687,8 @@ class OrcRemoteTargetClient : public OrcRemoteTargetRPCAPI { uint32_t getTrampolineSize() const { return RemoteTrampolineSize; } - Expected> readMem(char *Dst, JITTargetAddress Src, - uint64_t Size) { + Expected> readMem(char *Dst, JITTargetAddress Src, + uint64_t Size) { // Check for an 'out-of-band' error, e.g. from an MM destructor. if (ExistingError) return std::move(ExistingError); diff --git a/llvm-4.0.0.src/lib/Transforms/Instrumentation/LowFat.cpp b/llvm-4.0.0.src/lib/Transforms/Instrumentation/LowFat.cpp index e3eab25ef..12b5bca30 100644 --- a/llvm-4.0.0.src/lib/Transforms/Instrumentation/LowFat.cpp +++ b/llvm-4.0.0.src/lib/Transforms/Instrumentation/LowFat.cpp @@ -540,7 +540,12 @@ static Bounds getPtrBounds(const TargetLibraryInfo *TLI, const DataLayout *DL, Bounds bounds = Bounds::nonFat(); if (GetElementPtrInst *GEP = dyn_cast(Ptr)) { - bounds = getPtrBounds(TLI, DL, GEP->getPointerOperand(), boundsInfo); + // JumpThreading or other optimizations may produce incorrect IR that + // has not yet been removed; e.g. + // %231 = getelementptr inbounds i8, i8* %231, i64 1 + bounds = GEP != GEP->getPointerOperand() ? + getPtrBounds(TLI, DL, GEP->getPointerOperand(), boundsInfo) : + Bounds::nonFat(); if (!bounds.isUnknown() && !bounds.isNonFat()) { APInt offset(64, 0); diff --git a/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/CMakeLists.txt.legacy b/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/CMakeLists.txt.legacy index d4c97d528..5c8d99758 100644 --- a/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/CMakeLists.txt.legacy +++ b/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/CMakeLists.txt.legacy @@ -5,7 +5,7 @@ set(LOWFAT_SOURCES include_directories(..) -set(LOWFAT_CFLAGS -std=gnu99 -m64 -mno-bmi -mno-bmi2 -mno-lzcnt -I. -O2 -mcmodel=large -DLOWFAT_LINUX) +set(LOWFAT_CFLAGS ${SANITIZER_COMMON_CFLAGS} -std=gnu99 -m64 -mno-bmi -mno-bmi2 -mno-lzcnt -I. -O2 -mcmodel=large -DLOWFAT_LINUX) add_compiler_rt_runtime(clang_rt.lowfat STATIC diff --git a/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/CMakeLists.txt.modern b/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/CMakeLists.txt.modern index 06c073cba..4562341b0 100644 --- a/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/CMakeLists.txt.modern +++ b/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/CMakeLists.txt.modern @@ -5,7 +5,7 @@ set(LOWFAT_SOURCES include_directories(..) -set(LOWFAT_CFLAGS -std=gnu99 -m64 -I. -O2 -mbmi -mbmi2 -mlzcnt -mcmodel=large -DLOWFAT_LINUX) +set(LOWFAT_CFLAGS ${SANITIZER_COMMON_CFLAGS} -std=gnu99 -m64 -I. -O2 -mbmi -mbmi2 -mlzcnt -mcmodel=large -DLOWFAT_LINUX) add_compiler_rt_runtime(clang_rt.lowfat STATIC diff --git a/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/lowfat.c b/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/lowfat.c index 8d5c1a6dc..9ebf3fab4 100644 --- a/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/lowfat.c +++ b/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/lowfat.c @@ -27,7 +27,7 @@ #define LOWFAT_PAGE_SIZE 4096 #define LOWFAT_MAX_ADDRESS 0x1000000000000ull -#define LOWFAT_CONSTRUCTOR __attribute__((__constructor__(10102))) +#define LOWFAT_CONSTRUCTOR __attribute__((__constructor__(0))) #define LOWFAT_DESTRUCTOR __attribute__((__destructor__(10102))) #define LOWFAT_NOINLINE __attribute__((__noinline__)) #define LOWFAT_NORETURN __attribute__((__noreturn__)) @@ -55,9 +55,6 @@ static LOWFAT_NOINLINE void lowfat_warning(const char *format, ...); static LOWFAT_DATA uint8_t *lowfat_seed = NULL; static LOWFAT_DATA size_t lowfat_seed_pos = LOWFAT_PAGE_SIZE; static LOWFAT_DATA bool lowfat_malloc_inited = false; -#ifndef LOWFAT_WINDOWS -static LOWFAT_DATA char **lowfat_envp = NULL; -#endif #ifdef LOWFAT_WINDOWS #include "lowfat_windows.c" @@ -527,10 +524,7 @@ extern LOWFAT_NOINLINE void *lowfat_stack_pivot_2(void *stack_top) // that the environment is stored at the base of the stack, which is // currently true for Linux. It is also necessary to copy the argv/env // since we patch the stack. - if (lowfat_envp == NULL) - lowfat_error("failed to get the environment pointer"); - char **envp = lowfat_envp; - lowfat_envp = NULL; + char **envp = __environ; uint8_t *stack_bottom = (void *)envp; while (*envp != NULL) { @@ -579,26 +573,12 @@ __asm__ ( "\t.type lowfat_stack_pivot,@function\n" "lowfat_stack_pivot:\n" "\tmovq %rsp, %rdi\n" + "\tsub $8, %rsp\n" "\tmovabsq $lowfat_stack_pivot_2, %rax\n" "\tcallq *%rax\n" "\tmovq %rax, %rsp\n" "\tretq\n" ); -/* - * This bit of magic ensures lowfat_init() is called very early in process - * startup. Using the "constructor" attribute is not good enough since shared - * object constructors/initializers may be called before lowfat_init(). We - * also save the environment pointer so we can later derive the stack base. - */ -void lowfat_preinit(int argc, char **argv, char **envp) -{ - lowfat_envp = envp; - lowfat_init(); -} -__attribute__((section(".preinit_array"), used)) -void (*__local_effective_preinit)(int argc, char **argv, char **envp) = - lowfat_preinit; - #endif diff --git a/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/lowfat_linux.c b/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/lowfat_linux.c index 1c6670bbc..c9b223215 100644 --- a/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/lowfat_linux.c +++ b/llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/lowfat_linux.c @@ -61,6 +61,7 @@ static void lowfat_random_page(void *buf) path); } +#ifdef __GLIBC__ #include static LOWFAT_NOINLINE void lowfat_backtrace(void) { @@ -73,6 +74,9 @@ static LOWFAT_NOINLINE void lowfat_backtrace(void) if (len == 0 || len == sizeof(trace) / sizeof(void *)) fprintf(stderr, "...\n"); } +#else +static LOWFAT_NOINLINE void lowfat_backtrace(void) { } +#endif /* __GLIBC__ */ /* * Open a unique+anonymous shared memory object. diff --git a/llvm-4.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/llvm-4.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc index 683f019d7..8e409d5e8 100644 --- a/llvm-4.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +++ b/llvm-4.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc @@ -160,7 +160,6 @@ typedef struct user_fpregs elf_fpregset_t; # include #endif #include -#include #include #include #include @@ -253,7 +252,19 @@ namespace __sanitizer { #endif // SANITIZER_LINUX || SANITIZER_FREEBSD #if SANITIZER_LINUX && !SANITIZER_ANDROID - unsigned struct_ustat_sz = sizeof(struct ustat); + // Use pre-computed size of struct ustat to avoid which + // has been removed from glibc 2.28. +#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ + || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ + || defined(__x86_64__) +#define SIZEOF_STRUCT_USTAT 32 +#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ + || defined(__powerpc__) || defined(__s390__) +#define SIZEOF_STRUCT_USTAT 20 +#else +#error Unknown size of struct ustat +#endif + unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; unsigned struct_rlimit64_sz = sizeof(struct rlimit64); unsigned struct_statvfs64_sz = sizeof(struct statvfs64); #endif // SANITIZER_LINUX && !SANITIZER_ANDROID @@ -1147,8 +1158,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); CHECK_SIZE_AND_OFFSET(ipc_perm, gid); CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); -#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) -/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ +#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) +/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit + on many architectures. */ CHECK_SIZE_AND_OFFSET(ipc_perm, mode); #endif diff --git a/llvm-4.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/llvm-4.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h index c2d9f2cd3..e4669d360 100644 --- a/llvm-4.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/llvm-4.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h @@ -225,8 +225,7 @@ namespace __sanitizer { unsigned long __unused1; unsigned long __unused2; #else - unsigned short mode; - unsigned short __pad1; + unsigned int mode; unsigned short __seq; unsigned short __pad2; #if defined(__x86_64__) && !defined(_LP64) diff --git a/llvm-4.0.0.src/tools/clang/lib/AST/CXXInheritance.cpp b/llvm-4.0.0.src/tools/clang/lib/AST/CXXInheritance.cpp index a97d6a22e..56fb04640 100644 --- a/llvm-4.0.0.src/tools/clang/lib/AST/CXXInheritance.cpp +++ b/llvm-4.0.0.src/tools/clang/lib/AST/CXXInheritance.cpp @@ -88,7 +88,7 @@ bool CXXRecordDecl::isDerivedFrom(const CXXRecordDecl *Base, const CXXRecordDecl *BaseDecl = Base->getCanonicalDecl(); // FIXME: Capturing 'this' is a workaround for name lookup bugs in GCC 4.7. return lookupInBases( - [this, BaseDecl](const CXXBaseSpecifier *Specifier, CXXBasePath &Path) { + [BaseDecl](const CXXBaseSpecifier *Specifier, CXXBasePath &Path) { return FindBaseClass(Specifier, Path, BaseDecl); }, Paths); @@ -109,7 +109,7 @@ bool CXXRecordDecl::isVirtuallyDerivedFrom(const CXXRecordDecl *Base) const { const CXXRecordDecl *BaseDecl = Base->getCanonicalDecl(); // FIXME: Capturing 'this' is a workaround for name lookup bugs in GCC 4.7. return lookupInBases( - [this, BaseDecl](const CXXBaseSpecifier *Specifier, CXXBasePath &Path) { + [BaseDecl](const CXXBaseSpecifier *Specifier, CXXBasePath &Path) { return FindVirtualBaseClass(Specifier, Path, BaseDecl); }, Paths); diff --git a/llvm-4.0.0.src/tools/clang/lib/AST/MicrosoftMangle.cpp b/llvm-4.0.0.src/tools/clang/lib/AST/MicrosoftMangle.cpp index 76c368d7f..abe94786a 100644 --- a/llvm-4.0.0.src/tools/clang/lib/AST/MicrosoftMangle.cpp +++ b/llvm-4.0.0.src/tools/clang/lib/AST/MicrosoftMangle.cpp @@ -2997,14 +2997,14 @@ void MicrosoftMangleContextImpl::mangleStringLiteral(const StringLiteral *SL, // N.B. The length is in terms of bytes, not characters. Mangler.mangleNumber(SL->getByteLength() + SL->getCharByteWidth()); - auto GetLittleEndianByte = [&Mangler, &SL](unsigned Index) { + auto GetLittleEndianByte = [&SL](unsigned Index) { unsigned CharByteWidth = SL->getCharByteWidth(); uint32_t CodeUnit = SL->getCodeUnit(Index / CharByteWidth); unsigned OffsetInCodeUnit = Index % CharByteWidth; return static_cast((CodeUnit >> (8 * OffsetInCodeUnit)) & 0xff); }; - auto GetBigEndianByte = [&Mangler, &SL](unsigned Index) { + auto GetBigEndianByte = [&SL](unsigned Index) { unsigned CharByteWidth = SL->getCharByteWidth(); uint32_t CodeUnit = SL->getCodeUnit(Index / CharByteWidth); unsigned OffsetInCodeUnit = (CharByteWidth - 1) - (Index % CharByteWidth); diff --git a/llvm-4.0.0.src/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/llvm-4.0.0.src/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp index 402521713..777f5fb0b 100644 --- a/llvm-4.0.0.src/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/llvm-4.0.0.src/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -4006,8 +4006,8 @@ void CGOpenMPRuntime::emitTaskCall(CodeGenFunction &CGF, SourceLocation Loc, DepTaskArgs[5] = CGF.Builder.getInt32(0); DepTaskArgs[6] = llvm::ConstantPointerNull::get(CGF.VoidPtrTy); } - auto &&ThenCodeGen = [this, Loc, &Data, TDBase, KmpTaskTQTyRD, - NumDependencies, &TaskArgs, + auto &&ThenCodeGen = [this, &Data, TDBase, KmpTaskTQTyRD, NumDependencies, + &TaskArgs, &DepTaskArgs](CodeGenFunction &CGF, PrePostActionTy &) { if (!Data.Tied) { auto PartIdFI = std::next(KmpTaskTQTyRD->field_begin(), KmpTaskTPartId); @@ -4562,7 +4562,7 @@ void CGOpenMPRuntime::emitReduction(CodeGenFunction &CGF, SourceLocation Loc, } if (XExpr) { auto *VD = cast(cast(*ILHS)->getDecl()); - auto &&AtomicRedGen = [BO, VD, IPriv, + auto &&AtomicRedGen = [BO, VD, Loc](CodeGenFunction &CGF, const Expr *XExpr, const Expr *EExpr, const Expr *UpExpr) { LValue X = CGF.EmitLValue(XExpr); @@ -4572,7 +4572,7 @@ void CGOpenMPRuntime::emitReduction(CodeGenFunction &CGF, SourceLocation Loc, CGF.EmitOMPAtomicSimpleUpdateExpr( X, E, BO, /*IsXLHSInRHSPart=*/true, llvm::AtomicOrdering::Monotonic, Loc, - [&CGF, UpExpr, VD, IPriv, Loc](RValue XRValue) { + [&CGF, UpExpr, VD, Loc](RValue XRValue) { CodeGenFunction::OMPPrivateScope PrivateScope(CGF); PrivateScope.addPrivate( VD, [&CGF, VD, XRValue, Loc]() -> Address { @@ -5984,8 +5984,8 @@ void CGOpenMPRuntime::emitTargetCall(CodeGenFunction &CGF, OffloadError); // Fill up the pointer arrays and transfer execution to the device. - auto &&ThenGen = [&Ctx, &BasePointers, &Pointers, &Sizes, &MapTypes, Device, - OutlinedFnID, OffloadError, OffloadErrorQType, + auto &&ThenGen = [&BasePointers, &Pointers, &Sizes, &MapTypes, Device, + OutlinedFnID, OffloadError, &D](CodeGenFunction &CGF, PrePostActionTy &) { auto &RT = CGF.CGM.getOpenMPRuntime(); // Emit the offloading arrays. @@ -6271,8 +6271,8 @@ void CGOpenMPRuntime::emitTargetDataCalls( // Generate the code for the opening of the data environment. Capture all the // arguments of the runtime call by reference because they are used in the // closing of the region. - auto &&BeginThenGen = [&D, &CGF, Device, &Info, &CodeGen, &NoPrivAction]( - CodeGenFunction &CGF, PrePostActionTy &) { + auto &&BeginThenGen = [&D, Device, &Info, &CodeGen](CodeGenFunction &CGF, + PrePostActionTy &) { // Fill up the arrays with all the mapped variables. MappableExprsHandler::MapBaseValuesArrayTy BasePointers; MappableExprsHandler::MapValuesArrayTy Pointers; @@ -6318,8 +6318,7 @@ void CGOpenMPRuntime::emitTargetDataCalls( }; // Generate code for the closing of the data region. - auto &&EndThenGen = [&CGF, Device, &Info](CodeGenFunction &CGF, - PrePostActionTy &) { + auto &&EndThenGen = [Device, &Info](CodeGenFunction &CGF, PrePostActionTy &) { assert(Info.isValid() && "Invalid data environment closing arguments."); llvm::Value *BasePointersArrayArg = nullptr; @@ -6397,7 +6396,7 @@ void CGOpenMPRuntime::emitTargetDataStandAloneCall( "Expecting either target enter, exit data, or update directives."); // Generate the code for the opening of the data environment. - auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) { + auto &&ThenGen = [&D, Device](CodeGenFunction &CGF, PrePostActionTy &) { // Fill up the arrays with all the mapped variables. MappableExprsHandler::MapBaseValuesArrayTy BasePointers; MappableExprsHandler::MapValuesArrayTy Pointers; diff --git a/llvm-4.0.0.src/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp b/llvm-4.0.0.src/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp index 6a6d832e3..e74955257 100644 --- a/llvm-4.0.0.src/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp +++ b/llvm-4.0.0.src/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp @@ -533,8 +533,7 @@ void CGOpenMPRuntimeNVPTX::emitGenericParallelCall( ArrayRef CapturedVars, const Expr *IfCond) { llvm::Function *Fn = cast(OutlinedFn); - auto &&L0ParallelGen = [this, Fn, &CapturedVars](CodeGenFunction &CGF, - PrePostActionTy &) { + auto &&L0ParallelGen = [this, Fn](CodeGenFunction &CGF, PrePostActionTy &) { CGBuilderTy &Bld = CGF.Builder; // Prepare for parallel region. Indicate the outlined function. @@ -565,8 +564,8 @@ void CGOpenMPRuntimeNVPTX::emitGenericParallelCall( auto &&SeqGen = [this, Fn, &CapturedVars, &Args](CodeGenFunction &CGF, PrePostActionTy &) { - auto &&CodeGen = [this, Fn, &CapturedVars, &Args](CodeGenFunction &CGF, - PrePostActionTy &Action) { + auto &&CodeGen = [this, Fn, &CapturedVars](CodeGenFunction &CGF, + PrePostActionTy &Action) { Action.Enter(CGF); llvm::SmallVector OutlinedFnArgs; diff --git a/llvm-4.0.0.src/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp b/llvm-4.0.0.src/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp index 39e1cdfdb..1c08df7f7 100644 --- a/llvm-4.0.0.src/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/llvm-4.0.0.src/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -986,7 +986,7 @@ void CodeGenFunction::EmitOMPReductionClauseInit( OriginalBaseLValue); // Store the address of the original variable associated with the LHS // implicit variable. - PrivateScope.addPrivate(LHSVD, [this, OASELValueLB]() -> Address { + PrivateScope.addPrivate(LHSVD, [OASELValueLB]() -> Address { return OASELValueLB.getAddress(); }); // Emit reduction copy. @@ -1040,9 +1040,8 @@ void CodeGenFunction::EmitOMPReductionClauseInit( *this, OrigVD->getType(), ASELValue.getType(), OriginalBaseLValue); // Store the address of the original variable associated with the LHS // implicit variable. - PrivateScope.addPrivate(LHSVD, [this, ASELValue]() -> Address { - return ASELValue.getAddress(); - }); + PrivateScope.addPrivate( + LHSVD, [ASELValue]() -> Address { return ASELValue.getAddress(); }); // Emit reduction copy. bool IsRegistered = PrivateScope.addPrivate( OrigVD, [this, OrigVD, PrivateVD, BaseLValue, ASELValue, @@ -2633,7 +2632,7 @@ void CodeGenFunction::EmitOMPTaskBasedDirective(const OMPExecutableDirective &S, for (const auto *C : S.getClausesOfKind()) for (auto *IRef : C->varlists()) Data.Dependences.push_back(std::make_pair(C->getDependencyKind(), IRef)); - auto &&CodeGen = [PartId, &S, &Data, CS, &BodyGen, &LastprivateDstsOrigs]( + auto &&CodeGen = [&Data, CS, &BodyGen, &LastprivateDstsOrigs]( CodeGenFunction &CGF, PrePostActionTy &Action) { // Set proper addresses for generated private copies. OMPPrivateScope Scope(CGF); @@ -3250,7 +3249,7 @@ static void EmitOMPAtomicCaptureExpr(CodeGenFunction &CGF, bool IsSeqCst, NewVValType = XRValExpr->getType(); auto *ERValExpr = IsXLHSInRHSPart ? RHS : LHS; auto &&Gen = [&CGF, &NewVVal, UE, ExprRValue, XRValExpr, ERValExpr, - IsSeqCst, IsPostfixUpdate](RValue XRValue) -> RValue { + IsPostfixUpdate](RValue XRValue) -> RValue { CodeGenFunction::OpaqueValueMapping MapExpr(CGF, ERValExpr, ExprRValue); CodeGenFunction::OpaqueValueMapping MapX(CGF, XRValExpr, XRValue); RValue Res = CGF.EmitAnyExpr(UE); @@ -3277,7 +3276,7 @@ static void EmitOMPAtomicCaptureExpr(CodeGenFunction &CGF, bool IsSeqCst, NewVValType = X->getType().getNonReferenceType(); ExprRValue = convertToType(CGF, ExprRValue, E->getType(), X->getType().getNonReferenceType(), Loc); - auto &&Gen = [&CGF, &NewVVal, ExprRValue](RValue XRValue) -> RValue { + auto &&Gen = [&NewVVal, ExprRValue](RValue XRValue) -> RValue { NewVVal = XRValue; return ExprRValue; };