[PATCH] D39586: [CUDA] Mark CUDA as a no-errno platform.

Justin Lebar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 2 18:49:41 PDT 2017


jlebar created this revision.

CUDA doesn't support errno at all, so this is the right thing -- or at
least, in the right direction.

But also, this unbreaks the CUDA test-suite math tests [0] after https://reviews.llvm.org/D39481.
__cuda_cmath.h forwards nexttoward() to __builtin_nexttoward, which,
after that patch, was lowering to a libcall that doesn't exist in NVPTX.

[0] http://lab.llvm.org:8011/builders/clang-cuda-build/builds/14999


https://reviews.llvm.org/D39586

Files:
  clang/lib/Driver/ToolChains/Cuda.h


Index: clang/lib/Driver/ToolChains/Cuda.h
===================================================================
--- clang/lib/Driver/ToolChains/Cuda.h
+++ clang/lib/Driver/ToolChains/Cuda.h
@@ -157,6 +157,7 @@
   bool isPICDefaultForced() const override { return false; }
   bool SupportsProfiling() const override { return false; }
   bool SupportsObjCGC() const override { return false; }
+  bool IsMathErrnoDefault() const override { return false; }
 
   void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs,
                           llvm::opt::ArgStringList &CC1Args) const override;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39586.121427.patch
Type: text/x-patch
Size: 596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171103/5cb64202/attachment.bin>


More information about the cfe-commits mailing list