[PATCH] D44086: [LLVM-C] [bindings/go] Add C and Golang bindings for COMDAT

Ben Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 13 02:29:25 PDT 2018


ben-clayton added inline comments.


================
Comment at: include/llvm-c/Comdat.h:24
+typedef enum {
+  LLVMAnyComdatSelectionKind,        ///< The linker may choose any COMDAT.
+  LLVMExactMatchComdatSelectionKind, ///< The data referenced by the COMDAT must
----------------
rnk wrote:
> These should probably have explicit enumerator values so that they do not change over time.
Happy to change, but I'd like to understand the reasoning for keeping the enum values immutable. In Comdat.cpp we map these values to the C++ equivalents, so from at least the LLVM perspective there's no problem with the values changing over time. Are we expecting other languages to hardcode the constants instead of using this C enum?


Repository:
  rL LLVM

https://reviews.llvm.org/D44086





More information about the llvm-commits mailing list