[PATCH] D98705: [OpenCL] Prefer CodeGenFunction::EmitRuntimeCall

Luke Drummond via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 16 09:23:08 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG440f6bdf34f4: [OpenCL][NFCI] Prefer CodeGenFunction::EmitRuntimeCall (authored by ldrumm).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98705/new/

https://reviews.llvm.org/D98705

Files:
  clang/lib/CodeGen/CodeGenModule.cpp


Index: clang/lib/CodeGen/CodeGenModule.cpp
===================================================================
--- clang/lib/CodeGen/CodeGenModule.cpp
+++ clang/lib/CodeGen/CodeGenModule.cpp
@@ -6265,9 +6265,8 @@
   llvm::Constant *C = ConstantEmitter(CGF).emitAbstract(E, E->getType());
   auto *SamplerT = getOpenCLRuntime().getSamplerType(E->getType().getTypePtr());
   auto *FTy = llvm::FunctionType::get(SamplerT, {C->getType()}, false);
-  auto *Call = CGF.Builder.CreateCall(
+  auto *Call = CGF.EmitRuntimeCall(
       CreateRuntimeFunction(FTy, "__translate_sampler_initializer"), {C});
-  Call->setCallingConv(Call->getCalledFunction()->getCallingConv());
   return Call;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98705.331014.patch
Type: text/x-patch
Size: 687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210316/bf572383/attachment.bin>


More information about the cfe-commits mailing list