[PATCH] D51522: [LLVM-C] Add more debug information accessors to GlobalObject and Instruction

Robert Widmann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 30 20:40:54 PDT 2018


CodaFi added a comment.

In https://reviews.llvm.org/D51522#1220268, @whitequark wrote:

> How is a user of this API supposed to map the `unsigned Kind` values to something meaningful? We don't have an `enum LLVMMetadataKind`, do we?


You’re supposed to be able to register your own kinds with LLVMContext::getMDKindID et al.  I was planning to wrap those in a follow-up.



================
Comment at: include/llvm-c/Core.h:2150
+ */
+void LLVMGlobalClearMetadata(LLVMValueRef Glob);
+
----------------
whitequark wrote:
> Very small nit: `Global`. There's some code out there that generates a higher level API by parsing the C headers and inferring semantics from names, let's keep it easy to maintain.
I wanted to distinguish these from their unnamedspaced counterparts that seem to work exclusively with the parallel APIs in llvm::Instruction.  Is there some middle ground naming scheme here or should I remove the Global bits and add GlobalObject support to the Instruction one?


Repository:
  rL LLVM

https://reviews.llvm.org/D51522





More information about the llvm-commits mailing list