-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Make TypeId const comparable #142789
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
base: master
Are you sure you want to change the base?
Make TypeId const comparable #142789
Changes from all commits
b49b235
33e2364
ae7d982
886ab07
03c057d
1fd7b66
93f5995
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -303,6 +303,8 @@ impl<'gcc, 'tcx> ConstCodegenMethods for CodegenCx<'gcc, 'tcx> { | |
let init = self.const_data_from_alloc(alloc); | ||
self.static_addr_of(init, alloc.inner().align, None) | ||
} | ||
// TODO: generate segment of type id hash | ||
GlobalAlloc::Type { .. } => todo!(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be mostly the same as the LLVM implementation, except the call to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! I should really move this to codegen_as and expose those primitives |
||
GlobalAlloc::Static(def_id) => { | ||
assert!(self.tcx.is_static(def_id)); | ||
self.get_static(def_id).get_address(None) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably needs something like
data_id_for_type
similar todata_id_for_vtable
, which can then also be used incodegen_const_value
.