[PATCH] D92899: [ThinLTO][test] Add visibility related tests

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 30 16:30:12 PST 2020


MaskRay added inline comments.


================
Comment at: llvm/test/ThinLTO/X86/visibility-elf.ll:36
+; CHECK: declare hidden void @protected_def_weak_hidden_def()
+;; Currently the visibility is not propagated for an unimported function.
+; CHECK: declare extern_weak void @not_imported()
----------------
tejohnson wrote:
> Suggest making this comment a bit more explicit, e.g.:
> 
> ;; Currently the visibility is not propagated onto an unimported function, because we don't have summaries for declarations.
Thanks for the suggestions!


================
Comment at: llvm/test/ThinLTO/X86/visibility-macho.ll:36
+; CHECK2: define hidden i32 @hidden_def_weak_def()
+; CHECK2: define protected void @protected_def_weak_def()
+; CHECK2: define protected void @protected_def_weak_hidden_def()
----------------
tejohnson wrote:
> The protected_* symbols are not defined in this test.
My bad. `protected` is ELF specific and does not make sense on Mach-O. I'll delete `protected_*`.
Ideally the backend should error on `protected`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92899



More information about the llvm-commits mailing list