Add the pass_object_size attribute to clang.
`pass_object_size` is our way of enabling `__builtin_object_size` to produce high quality results without requiring inlining to happen everywhere. A link to the design doc for this attribute is available at the Differential review link below. Differential Revision: http://reviews.llvm.org/D13263 llvm-svn: 254554
This commit is contained in:
@@ -1830,8 +1830,11 @@ llvm::Constant *CodeGenModule::GetAddrOfFunction(GlobalDecl GD,
|
||||
bool DontDefer,
|
||||
bool IsForDefinition) {
|
||||
// If there was no specific requested type, just convert it now.
|
||||
if (!Ty)
|
||||
Ty = getTypes().ConvertType(cast<ValueDecl>(GD.getDecl())->getType());
|
||||
if (!Ty) {
|
||||
const auto *FD = cast<FunctionDecl>(GD.getDecl());
|
||||
auto CanonTy = Context.getCanonicalType(FD->getType());
|
||||
Ty = getTypes().ConvertFunctionType(CanonTy, FD);
|
||||
}
|
||||
|
||||
StringRef MangledName = getMangledName(GD);
|
||||
return GetOrCreateLLVMFunction(MangledName, Ty, GD, ForVTable, DontDefer,
|
||||
|
||||
Reference in New Issue
Block a user