1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[HIP] Fix managed variable linkage

Currently managed variables are emitted as undefined symbols, which
causes difficulty for diagnosing undefined symbols for non-managed
variables.

This patch transforms managed variables in device compilation so that
they can be emitted as normal variables.

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D96195
This commit is contained in:
Yaxun (Sam) Liu 2021-02-05 14:40:16 -05:00
parent 6f65abbdde
commit a55327fc56

View File

@ -60,6 +60,7 @@ Instruction *createReplacementInstr(ConstantExpr *CE, Instruction *Instr) {
case Instruction::PtrToInt:
case Instruction::IntToPtr:
case Instruction::BitCast:
case Instruction::AddrSpaceCast:
return dyn_cast<Instruction>(
Builder.CreateCast((Instruction::CastOps)OpCode, CE->getOperand(0),
CE->getType(), CE->getName()));