diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2022-11-22 21:02:20 -0500 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2022-11-22 21:42:44 -0500 |
| commit | 0d527e56a5ee3fd0435e6f99a10692e5115f36b7 (patch) | |
| tree | 19cffb57a65c20603a062aa0bb97d22d39974108 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | 646396194111a4e820a5b8d12a9b890481fb6469 (diff) | |
GlobalIFunc: Make ifunc respect function address spaces
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
| -rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index c4805602d1ad..198fe331daff 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -2873,8 +2873,8 @@ Error BitcodeReader::resolveGlobalAndIndirectSymbolInits() { Type *ResolverFTy = GlobalIFunc::getResolverFunctionType(GI->getValueType()); // Transparently fix up the type for compatibility with older bitcode - GI->setResolver( - ConstantExpr::getBitCast(C, ResolverFTy->getPointerTo())); + GI->setResolver(ConstantExpr::getBitCast( + C, ResolverFTy->getPointerTo(GI->getAddressSpace()))); } else { return error("Expected an alias or an ifunc"); } |
