aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorJon Chesterfield <jonathanchesterfield@gmail.com>2021-11-10 15:30:55 +0000
committerJon Chesterfield <jonathanchesterfield@gmail.com>2021-11-10 15:30:56 +0000
commit27177b82d4ca4451f288168fc1e06c0736afbdaf (patch)
treef999a65ff825b71bcbd42f24dd0d8a37ce02b762 /clang/lib/CodeGen/CodeGenFunction.h
parent8cd1c2c8d3c49e37f11b8ed84844c87c2a4d829c (diff)
downloadllvm-27177b82d4ca4451f288168fc1e06c0736afbdaf.zip
llvm-27177b82d4ca4451f288168fc1e06c0736afbdaf.tar.gz
llvm-27177b82d4ca4451f288168fc1e06c0736afbdaf.tar.bz2
[OpenMP] Lower printf to __llvm_omp_vprintf
Extension of D112504. Lower amdgpu printf to `__llvm_omp_vprintf` which takes the same const char*, void* arguments as cuda vprintf and also passes the size of the void* alloca which will be needed by a non-stub implementation of `__llvm_omp_vprintf` for amdgpu. This removes the amdgpu link error on any printf in a target region in favour of silently compiling code that doesn't print anything to stdout. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D112680
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 6d8d1f4..d5ac17c 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -4098,10 +4098,9 @@ public:
RValue EmitCUDAKernelCallExpr(const CUDAKernelCallExpr *E,
ReturnValueSlot ReturnValue);
- RValue EmitNVPTXDevicePrintfCallExpr(const CallExpr *E,
- ReturnValueSlot ReturnValue);
- RValue EmitAMDGPUDevicePrintfCallExpr(const CallExpr *E,
- ReturnValueSlot ReturnValue);
+ RValue EmitNVPTXDevicePrintfCallExpr(const CallExpr *E);
+ RValue EmitAMDGPUDevicePrintfCallExpr(const CallExpr *E);
+ RValue EmitOpenMPDevicePrintfCallExpr(const CallExpr *E);
RValue EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
const CallExpr *E, ReturnValueSlot ReturnValue);