[flang-commits] [flang] c949500 - [flang][cuda] Fix not declared terminator (#114866)
via flang-commits
flang-commits at lists.llvm.org
Mon Nov 4 12:38:06 PST 2024
Author: Valentin Clement (バレンタイン クレメン)
Date: 2024-11-04T12:38:02-08:00
New Revision: c949500d519085a4e5b93928b14ca766a353ad73
URL: https://github.com/llvm/llvm-project/commit/c949500d519085a4e5b93928b14ca766a353ad73
DIFF: https://github.com/llvm/llvm-project/commit/c949500d519085a4e5b93928b14ca766a353ad73.diff
LOG: [flang][cuda] Fix not declared terminator (#114866)
Added:
Modified:
flang/runtime/CUDA/memory.cpp
Removed:
################################################################################
diff --git a/flang/runtime/CUDA/memory.cpp b/flang/runtime/CUDA/memory.cpp
index 5aa7ac5c3cccd1..34442d05f495d3 100644
--- a/flang/runtime/CUDA/memory.cpp
+++ b/flang/runtime/CUDA/memory.cpp
@@ -112,6 +112,7 @@ void RTDEF(CUFDataTransferPtrDesc)(void *addr, Descriptor *desc,
void RTDECL(CUFDataTransferDescDesc)(Descriptor *dstDesc, Descriptor *srcDesc,
unsigned mode, const char *sourceFile, int sourceLine) {
MemmoveFct memmoveFct;
+ Terminator terminator{sourceFile, sourceLine};
if (mode == kHostToDevice) {
memmoveFct = &MemmoveHostToDevice;
} else if (mode == kDeviceToHost) {
@@ -119,7 +120,6 @@ void RTDECL(CUFDataTransferDescDesc)(Descriptor *dstDesc, Descriptor *srcDesc,
} else if (mode == kDeviceToDevice) {
memmoveFct = &MemmoveDeviceToDevice;
} else {
- Terminator terminator{sourceFile, sourceLine};
terminator.Crash("host to host copy not supported");
}
Fortran::runtime::Assign(
More information about the flang-commits
mailing list