[PATCH] D18328: [CUDA] Add option to mark most functions inside <complex> as host+device.
    Richard Smith via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Mon Mar 21 16:27:24 PDT 2016
    
    
  
rsmith added inline comments.
================
Comment at: lib/Sema/SemaCUDA.cpp:479-481
@@ +478,5 @@
+    return false;
+  StringRef Filename = FE->getName();
+  if (Filename != "complex" && !Filename.endswith("/complex"))
+    return false;
+
----------------
jlebar wrote:
> rsmith wrote:
> > I don't think this works: the standard library might factor parts of <complex> out into separate header files. For instance, libstdc++ 4.4 includes the TR1 pieces of <complex> in that way.
> Hm, that is unfortunate.  One option would be to say that we just don't support this.  Otherwise we have to go down the road of identifying all the relevant functions...
I've not checked GCC 5 onwards, but it looks like in the 4.x series, this is the only problem of this kind, and only affects the TR1 pieces (which it seems we probably don't need to care about supporting here). libc++ doesn't currently have any problems of this kind. Obviously it's unknown what issues we'll see with other standard library implementations.
http://reviews.llvm.org/D18328
    
    
More information about the cfe-commits
mailing list