[PATCH] D111757: [CFI] Add a module flag to allow custom section on globals with !type metadata when not doing CFI

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 14 11:20:13 PDT 2021


kubamracek added a comment.

>> has this always been broken?
>
> I guess it might be helpful to elaborate why it should be safe to ignore custom sections and/or when it would be safe for frontends to emit the new flag.

I think this "confusion" between CFI and VFE has always been there, as far as I can tell --  when doing VFE with no CFI. But vtables emitted by Clang never have a custom section specified, so I believe this problem can not be triggered from Clang.

> would be safe for frontends to emit the new flag

My understanding is that if the frontend is not trying to enable CFI at all, *then* it's safe to emit the flag. Where would you like to see this explanation in source code? LangRef doesn't really try to document module flags... A comment instead?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111757



More information about the llvm-commits mailing list