forked from OSchip/llvm-project
Insert dynamic checks only if the appropriate
checker functions exist. llvm-svn: 157652
This commit is contained in:
parent
850ef99516
commit
53bacf2130
|
@ -611,6 +611,8 @@ IRDynamicChecks::runOnModule(llvm::Module &M)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_checker_functions.m_valid_pointer_check.get())
|
||||||
|
{
|
||||||
ValidPointerChecker vpc(M, m_checker_functions);
|
ValidPointerChecker vpc(M, m_checker_functions);
|
||||||
|
|
||||||
if (!vpc.Inspect(*function))
|
if (!vpc.Inspect(*function))
|
||||||
|
@ -618,7 +620,10 @@ IRDynamicChecks::runOnModule(llvm::Module &M)
|
||||||
|
|
||||||
if (!vpc.Instrument())
|
if (!vpc.Instrument())
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_checker_functions.m_objc_object_check.get())
|
||||||
|
{
|
||||||
ObjcObjectChecker ooc(M, m_checker_functions);
|
ObjcObjectChecker ooc(M, m_checker_functions);
|
||||||
|
|
||||||
if (!ooc.Inspect(*function))
|
if (!ooc.Inspect(*function))
|
||||||
|
@ -626,6 +631,7 @@ IRDynamicChecks::runOnModule(llvm::Module &M)
|
||||||
|
|
||||||
if (!ooc.Instrument())
|
if (!ooc.Instrument())
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (log && log->GetVerbose())
|
if (log && log->GetVerbose())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue