[PATCH] D73642: [Clang][Bundler] Reduce fat object size

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 29 13:22:13 PST 2020


ABataev added inline comments.


================
Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:371
+// object destruction.
+struct TempFileList {
+  ~TempFileList() {
----------------
If you have `private` members, it should be a class. Also, seems to me it is a RAII class. Better to name it something like `TempFileHandlerRAII` or something like this.


================
Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:378
+  // Creates temporary file with given contents.
+  Expected<StringRef> Create(Optional<ArrayRef<char>> Contents) {
+    SmallString<128u> File;
----------------
I see that Contents is either `None` or just one byte `0`. Maybe, better to use bool flag here instead of `Contents`?


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

https://reviews.llvm.org/D73642





More information about the cfe-commits mailing list