diff options
author | Sean Callanan <scallanan@apple.com> | 2012-05-29 23:46:46 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2012-05-29 23:46:46 +0000 |
commit | 53bacf21307177997ea38801671f5efc335386a7 (patch) | |
tree | 4e58e8fac27855aa1c79456be85b661e1f48c1c9 /lldb/source/Expression/IRDynamicChecks.cpp | |
parent | 850ef99516ae2f6a79b16c10cdae159e889ac763 (diff) | |
download | bcm5719-llvm-53bacf21307177997ea38801671f5efc335386a7.tar.gz bcm5719-llvm-53bacf21307177997ea38801671f5efc335386a7.zip |
Insert dynamic checks only if the appropriate
checker functions exist.
llvm-svn: 157652
Diffstat (limited to 'lldb/source/Expression/IRDynamicChecks.cpp')
-rw-r--r-- | lldb/source/Expression/IRDynamicChecks.cpp | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/lldb/source/Expression/IRDynamicChecks.cpp b/lldb/source/Expression/IRDynamicChecks.cpp index 9bf1d8b309d..0c0c786ecef 100644 --- a/lldb/source/Expression/IRDynamicChecks.cpp +++ b/lldb/source/Expression/IRDynamicChecks.cpp @@ -611,22 +611,28 @@ IRDynamicChecks::runOnModule(llvm::Module &M) return false; } - ValidPointerChecker vpc(M, m_checker_functions); - - if (!vpc.Inspect(*function)) - return false; - - if (!vpc.Instrument()) - return false; - - ObjcObjectChecker ooc(M, m_checker_functions); - - if (!ooc.Inspect(*function)) - return false; + if (m_checker_functions.m_valid_pointer_check.get()) + { + ValidPointerChecker vpc(M, m_checker_functions); + + if (!vpc.Inspect(*function)) + return false; + + if (!vpc.Instrument()) + return false; + } - if (!ooc.Instrument()) - return false; - + if (m_checker_functions.m_objc_object_check.get()) + { + ObjcObjectChecker ooc(M, m_checker_functions); + + if (!ooc.Inspect(*function)) + return false; + + if (!ooc.Instrument()) + return false; + } + if (log && log->GetVerbose()) { std::string s; |