[PATCH] D78793: Names for structs are held on the Context, not the Module. Move getTypeByName from Module to Type taking a Context parameter.
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 30 13:26:41 PDT 2020
jdoerfert added inline comments.
================
Comment at: llvm/include/llvm-c/Core.h:873
-/**
- * Obtain a Type from a module by its registered name.
- */
+/** Deprecated: Use LLVMGetTypeByName2 instead. */
LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name);
----------------
nickwasmer wrote:
> jdoerfert wrote:
> > 1) Should we use the deprecated attribute here?
> > 2) We cannot use attribute((overrload)) can we?
> 1. There aren't any other uses of attribute deprecated, or any GNU-style attribute in the C API header files. At a guess, this might be for compatibility with non-GNU compilers.
>
> 2. We can't. It would change the symbol name of both of them, which would be an ABI break for the existing `LLVMGetTypeByName`.
>
1. Unclear if that is really a problem but OK.
2. Makes sense.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78793/new/
https://reviews.llvm.org/D78793
More information about the llvm-commits
mailing list