r317297 - [CUDA] Mark CUDA as a no-errno platform.

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 2 19:30:00 PDT 2017


Author: jlebar
Date: Thu Nov  2 19:30:00 2017
New Revision: 317297

URL: http://llvm.org/viewvc/llvm-project?rev=317297&view=rev
Log:
[CUDA] Mark CUDA as a no-errno platform.

Summary:
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 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

Reviewers: tra

Subscribers: sanjoy, cfe-commits

Differential Revision: https://reviews.llvm.org/D39586

Modified:
    cfe/trunk/lib/Driver/ToolChains/Cuda.h

Modified: cfe/trunk/lib/Driver/ToolChains/Cuda.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Cuda.h?rev=317297&r1=317296&r2=317297&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Cuda.h (original)
+++ cfe/trunk/lib/Driver/ToolChains/Cuda.h Thu Nov  2 19:30:00 2017
@@ -157,6 +157,7 @@ public:
   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;




More information about the cfe-commits mailing list