forked from OSchip/llvm-project
[clang][OpaquePtr] Remove call to getPointerElementType() in CodeGenModule::GetAddrOfGlobalTemporary()
This commit is contained in:
parent
595d340dce
commit
87dd3d350c
|
@ -5670,9 +5670,11 @@ ConstantAddress CodeGenModule::GetAddrOfGlobalTemporary(
|
|||
getModule(), Type, false, llvm::GlobalVariable::InternalLinkage,
|
||||
nullptr);
|
||||
}
|
||||
return ConstantAddress(
|
||||
InsertResult.first->second,
|
||||
InsertResult.first->second->getType()->getPointerElementType(), Align);
|
||||
return ConstantAddress(InsertResult.first->second,
|
||||
llvm::cast<llvm::GlobalVariable>(
|
||||
InsertResult.first->second->stripPointerCasts())
|
||||
->getValueType(),
|
||||
Align);
|
||||
}
|
||||
|
||||
// FIXME: If an externally-visible declaration extends multiple temporaries,
|
||||
|
|
Loading…
Reference in New Issue