While this makes the unit tests a bit more verbose, this simplifies the creation of bindings because only the bidirectional mapping between the host language's string type and MlirStringRef need to be implemented.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir-c/IR.h | ||
---|---|---|
155 | I rather keep the name mlirLocationFileLineColGet and not expose the const char * one: otherwise we'll have to "overload" every API with StringRef and char* |
Comment Actions
To be perfectly clear, I agree that we should use MlirStringRef throughout, but if we decide that we should do that across the API in one fell swoop (I’m happy to author that PR if folks are on board).
@ftynse thoughts?
Comment Actions
Sure, let's use MlirStringRef everywhere, this also indicates that we don't take ownership of the string. We added it much later than APIs that could be using it and nobody had time to reconsider those yet.
Comment Actions
Sorry for the spam, I am still learning my way around arc diff. This should be ready now though.
I rather keep the name mlirLocationFileLineColGet and not expose the const char * one: otherwise we'll have to "overload" every API with StringRef and char*