Closed peteryongzhong closed 1 year ago
memoir::Struct::getType()
is a memoir::StructType
. Anything that is an LLVM type in the memoir compiler passes is marked explicitly as llvm::
.
@jiujiu1123 is this issue still open? I wasn't able to reproduce it today.
Fixed with 8897dd29b5fb93f360c0d4e7f3ff6574eb0cce47
Might be a somewhat stupid question about C++ namespaces. I was always assuming that memoir::Struct::getType() would be of type memoir::StructType as opposed to llvm::StructType.
Therefore, getNumFields, should be available. But in https://github.com/arcana-lab/memoir/blob/d13ca91156cc34b3b8513592dcdfe017d1b49b75/compiler/passes/object_lowering/src/ObjectLowering.cpp#L53
The compiler emits an error as it is believing it to be an LLVM type instead.
I apologzie if this is a little too stupid but am a little curious on if i somehow misunderstood the namespaces.