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
ConstantInt should overload getType() to return an IntegerType* #1492
Comments
I just emailed Chris about this. There are actually several related changes needed:
I have already assigned Sheng to do this. I'm assigning this PR to him so |
Re: this:
That's not quite right. ConstantInt is a Constant which is a Value which has static ConstantInt *get(const Type *Ty, int64_t V); The first requires a Type and item 3 on my list above requires that to change to |
Sheng: this needs to be your highest priority right now as it is "Phase 2" work. |
As Chris suggested, the #3 will not be done. Because it will cause much change |
This is now implemented: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070115/042960.html |
…ca1085dfb1b20c842b0ffb Backport [lldb] Only set the executable module for a target once and fix build error
Extended Description
If a ConstantInt user wants the number of bits in the int, they have to call
getType, then cast the Type* to an IntegerType*. Instead, it should be possible
to retrieve the IntegerType* directly from ConstantInt.
This is difficult because ConstantInt doesn't actually keep the IntegerType*
internally, nor does it require one on construction, etc. This will probably
cause residual effects throughout LLVM, but it shouldn't be very hard to clean up.
The text was updated successfully, but these errors were encountered: