diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2022-12-21 07:57:49 -0500 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2022-12-21 08:27:24 -0500 |
| commit | 719123230577ebfb689b53ed09f4d06ddc1664ef (patch) | |
| tree | eb9bdd7fee94c6fdcc082af0a1a100a699f5d80c /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 947905a1c5843b677849c3c4fadb524b6405c139 (diff) | |
clang: Fix another assert from not respecting function address spaces
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 50e2f5bf212e..ac71346de298 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -4120,8 +4120,8 @@ llvm::Constant *CodeGenModule::GetOrCreateLLVMFunction( return F; } - llvm::Type *PTy = llvm::PointerType::getUnqual(Ty); - return llvm::ConstantExpr::getBitCast(F, PTy); + return llvm::ConstantExpr::getBitCast(F, + Ty->getPointerTo(F->getAddressSpace())); } /// GetAddrOfFunction - Return the address of the given function. If Ty is |
