File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1316,10 +1316,10 @@ void CGOpenMPRuntimeGPU::emitTargetCall(
13161316 llvm::function_ref<llvm::Value *(CodeGenFunction &CGF,
13171317 const OMPLoopDirective &D)>
13181318 SizeEmitter) {
1319- SmallString< 256 > Buffer;
1320- llvm::raw_svector_ostream Out (Buffer);
1321- Out << " Cannot emit a '#pragma omp target' on the GPU" ;
1322- CGM.Error ( D.getBeginLoc (), Out. str () );
1319+ unsigned DiagID = CGM. getDiags (). getCustomDiagID (
1320+ DiagnosticsEngine::Error,
1321+ " Cannot emit a '#pragma omp target' region on the GPU" ) ;
1322+ CGM.getDiags (). Report ( D.getBeginLoc (), DiagID );
13231323}
13241324
13251325void CGOpenMPRuntimeGPU::emitCriticalRegion (
Original file line number Diff line number Diff line change 22// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple nvptx64-nvidia-cuda -emit-llvm %s
33
44void foo () {
5- #pragma omp target // expected-error {{Cannot emit a '#pragma omp target' on the GPU}}
5+ #pragma omp target // expected-error {{Cannot emit a '#pragma omp target' region on the GPU}}
66 ;
77}
You can’t perform that action at this time.
0 commit comments