clang: Respect function address space for __builtin_function_start
Fixes assertion.
This commit is contained in:
@@ -4170,8 +4170,9 @@ llvm::Constant *CodeGenModule::GetFunctionStart(const ValueDecl *Decl) {
|
||||
llvm::GlobalValue *F =
|
||||
cast<llvm::GlobalValue>(GetAddrOfFunction(Decl)->stripPointerCasts());
|
||||
|
||||
return llvm::ConstantExpr::getBitCast(llvm::NoCFIValue::get(F),
|
||||
llvm::Type::getInt8PtrTy(VMContext));
|
||||
return llvm::ConstantExpr::getBitCast(
|
||||
llvm::NoCFIValue::get(F),
|
||||
llvm::Type::getInt8PtrTy(VMContext, F->getAddressSpace()));
|
||||
}
|
||||
|
||||
static const FunctionDecl *
|
||||
|
||||
Reference in New Issue
Block a user