[PATCH] D81972: [NFC] Cleanup of EmitCXXGlobalInitFunc() and EmitCXXGlobalDtorFunc()

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 17 22:07:46 PDT 2020


hubert.reinterpretcast added inline comments.


================
Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:600
+  // with priority emitted above.
+  SmallString<128> FileName;
   llvm::Function *Fn = CreateGlobalInitOrDestructFunction(
----------------
In the less complex context of this patch, it seems this should just initialize `FileName` with `getTransformedFileName(getModule())` by having `getTransformedFileName` return a `SmallString<128>` directly instead of a `StringRef` backed by a `SmallString<128>`. I think this would still translate well to D74166.


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

https://reviews.llvm.org/D81972





More information about the cfe-commits mailing list