forked from OSchip/llvm-project
Fix a potential null-pointer use, and fix the style of my new function.
Thanks, Anton! llvm-svn: 95821
This commit is contained in:
parent
bbc0aa5166
commit
42b3842429
|
@ -83,7 +83,7 @@ static void HandleX86ForceAlignArgPointerAttr(Decl *D,
|
||||||
// do anything, either. It doesn't matter anyway, because there's nothing
|
// do anything, either. It doesn't matter anyway, because there's nothing
|
||||||
// special about calling a force_align_arg_pointer function.
|
// special about calling a force_align_arg_pointer function.
|
||||||
ValueDecl* VD = dyn_cast<ValueDecl>(D);
|
ValueDecl* VD = dyn_cast<ValueDecl>(D);
|
||||||
if(VD->getType()->isFunctionPointerType())
|
if (VD && VD->getType()->isFunctionPointerType())
|
||||||
return;
|
return;
|
||||||
// Attribute can only be applied to function types.
|
// Attribute can only be applied to function types.
|
||||||
if (!isa<FunctionDecl>(D)) {
|
if (!isa<FunctionDecl>(D)) {
|
||||||
|
|
Loading…
Reference in New Issue