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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to