mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-22 01:06:56 +00:00
The canonical location of the instruction may be an entirely different instruction, which the instruction in question was not imported from. In particular, we shouldn't assume that we can use the constant value of an instruction that the *location* of an imported instruction refers to as the constant value of the imported instruction. The only time we should be looking at the `ImportIRInstId` for a `LocId` is when determining its location in some other file. Fixes a crash when importing thunks (which can contain instructions whose location points to an instruction in a differnt IR). --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>