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

Pedro Ferreira via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 23 06:23:55 PST 2022


arkangath 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.
----------------
Shouldn't what the return value means be documented here?


================
Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:1190-1191
+    }
+    OS << "\n";
+    OptionalEndif = "#endif // TypeExtension\n";
+  }
----------------
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 ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120262



More information about the cfe-commits mailing list