[PATCH] D81972: [NFC] Cleanup of EmitCXXGlobalInitFunc() and EmitCXXGlobalDtorFunc()
Jason Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 17 09:40:53 PDT 2020
jasonliu added inline comments.
================
Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:596
}
+ // Include the filename in the symbol name. Including "sub_" matches gcc
----------------
jasonliu wrote:
> I think this patch is missing what @hubert.reinterpretcast mentioned in https://reviews.llvm.org/D74166?id=269900#inline-751064
> which is an early return like this:
>
> ```
> if (CXXGlobalInits.empty())
> return;
> ```
Please double check the above early return is desired though. It seems even when CXXGlobalInits is empty, `GenerateCXXGlobalInitFunc` is trying to do a lot of things with `Fn` passed in. Later, we also called `AddGlobalCtor(Fn)`. So a lot of behavior changes here, we want to make sure it's really 'NFC'.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81972/new/
https://reviews.llvm.org/D81972
More information about the cfe-commits
mailing list