Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement type mapping for VectorType #9

Closed
wants to merge 3 commits into from

Conversation

wilsonk
Copy link

@wilsonk wilsonk commented Apr 14, 2015

I ran into the need for this when trying to build an opencv example. Now I am running into an operator overload problem (same error for zeromq and a couple STL examples), so it seems that fixing operator overloading is the most pressing matter now.

@Syniurge
Copy link
Owner

Hi Kelly,

The mapping is incorrect, VectorType and ExtVectorType are never sugared:

http://clang.llvm.org/doxygen/Type_8h_source.html#l02600
http://clang.llvm.org/doxygen/Type_8h_source.html#l02682

And more importantly you should be returning a TypeVector. The TypeVector constructor expects a TypeSArray as argument, look into mtype.h/cpp for more details.

@wilsonk
Copy link
Author

wilsonk commented Apr 15, 2015

Hey Elie,

Geez, I should actually look at the D side of this more. I just figured since fromType worked here then things were being mapped fine. Didn’t even think to check if isSugared would return only false.

I also wrote a couple tests this time to make sure things worked instead of just assuming. Seems to compile and work now. We get a runtime error on the D side if the C++ vector type is too big, at least.

Thanks,

Kelly

From: Elie Morisse [mailto:[email protected]]
Sent: Tuesday, April 14, 2015 5:35 PM
To: Syniurge/Calypso
Cc: wilsonk
Subject: Re: [Calypso] Implement type mapping for VectorType (#9)

Hi Kelly,

The mapping is incorrect, VectorType and ExtVectorType are never sugared:

http://clang.llvm.org/doxygen/Type_8h_source.html#l02600
http://clang.llvm.org/doxygen/Type_8h_source.html#l02682

And more importantly you should be returning a TypeVector. The TypeVector constructor expects a TypeSArray as argument, look into mtype.h/cpp for more details.


Reply to this email directly or view it on GitHub #9 (comment) .

@Syniurge
Copy link
Owner

Merged manually after squashing, and oddly the PR didn't pick up so I'm closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants