[PATCH] Sema: Accept pointers to any address space for builtin functions
Anastasia
anastasia.stulova at arm.com
Wed Mar 18 10:20:51 PDT 2015
REPOSITORY
rL LLVM
================
Comment at: lib/Sema/SemaExpr.cpp:4615
@@ +4614,3 @@
+ FunctionProtoType::ExtProtoInfo EPI;
+ QualType OverloadTy = Context.getFunctionType(FT->getReturnType(),
+ OverloadParams, EPI);
----------------
Should address space of return type also be taken into account?
================
Comment at: lib/Sema/SemaExpr.cpp:4750
@@ +4749,3 @@
+ // Rewrite the function decl for this builtin by replacing paramaters
+ // with no explicit address space with the address space of the arguemnts
+ // in ArgExprs.
----------------
typo: arguemnts -> arguments
================
Comment at: test/Sema/builtins.cl:4
@@ +3,3 @@
+kernel void test(global float *out, global float *in, global int* in2) {
+
+ out[0] = __builtin_nanf(""); // expected-no-diagnostics
----------------
remove empty line
================
Comment at: test/Sema/builtins.cl:5
@@ +4,3 @@
+
+ out[0] = __builtin_nanf(""); // expected-no-diagnostics
+ __builtin_memcpy(out, in, 32); // expected-no-diagnostics
----------------
You need "expected-no-diagnostics" only once in the file (for example after RUN line).
================
Comment at: test/Sema/builtins.cl:8
@@ +7,3 @@
+ out[0] = __builtin_frexpf(in[0], in2); // expected-no-diagnostics
+
+}
----------------
remove empty line
http://reviews.llvm.org/D8082
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list