This commit ensures that all functions produced by FuncToLLVM drop the
llvm.linkage attribute. Furthermore, it adds a small test that checks if
the readnone attribute is preserved.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp | ||
---|---|---|
67 | ultra nit: Drop -> Drops. I am not sure about the second half of the comment ("or are attached to the function manually". In general the function seems to copy all manually set attributes except for linkageAttrName? Shouldn't we just drop this second half of the sentence? | |
mlir/test/Conversion/FuncToLLVM/emit-c-wrappers-for-external-callers.mlir | ||
76 | nit: what about calling the function "drop_default_linkage"? Then it is more obvious why the linkage is not printed? |
mlir/test/Conversion/FuncToLLVM/emit-c-wrappers-for-external-callers.mlir | ||
---|---|---|
76 | This does not just drop the external linkage but all linkage attributes. I changed the other test to use weak linkage to demonstrate that this influences the signature but no longer appears as an attribute. |
ultra nit: Drop -> Drops.
I am not sure about the second half of the comment ("or are attached to the function manually". In general the function seems to copy all manually set attributes except for linkageAttrName? Shouldn't we just drop this second half of the sentence?