[PATCH] D120262: [OpenCL] Handle TypeExtensions in OpenCLBuiltinFileEmitter

Sven van Haastregt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 23 07:34:20 PST 2022


svenvh marked 2 inline comments as done.
svenvh added inline comments.


================
Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:296-298
 
+  // Emit an #if guard for all type extensions required for the given type
+  // strings.
----------------
arkangath wrote:
> Shouldn't what the return value means be documented here?
Good catch, added.


================
Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:1190-1191
+    }
+    OS << "\n";
+    OptionalEndif = "#endif // TypeExtension\n";
+  }
----------------
arkangath wrote:
> Seems to me that this is the only assignment to the OptionalEndif variable. In which case, can't it be a StringRef ? And the return of the function be StringRef too ?
Indeed; updated.


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

https://reviews.llvm.org/D120262



More information about the cfe-commits mailing list