From 6d944109144acdfdba7caf6fd1a29cbbff0f4628 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Wed, 2 May 2018 15:45:28 +0000 Subject: [OPENMP] Support C++ member functions in the device constructs. Added correct emission of the C++ member functions for the device function when they are used in the device constructs. llvm-svn: 331365 --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 063b9be4cd02..6e3747a188b9 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2398,7 +2398,7 @@ llvm::Constant *CodeGenModule::GetOrCreateLLVMFunction( if (const FunctionDecl *FD = cast_or_null(D)) { // For the device mark the function as one that should be emitted. if (getLangOpts().OpenMPIsDevice && OpenMPRuntime && - !OpenMPRuntime->markAsGlobalTarget(FD) && FD->isDefined() && + !OpenMPRuntime->markAsGlobalTarget(GD) && FD->isDefined() && !DontDefer && !IsForDefinition) addDeferredDeclToEmit(GD); -- cgit v1.2.3