#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/raw_ostream.h"
#include "IRDynamicChecks.h"
#include "lldb/Expression/UtilityFunction.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
usingnamespacellvm;
usingnamespacelldb_private;
static char ID;
#define VALID_POINTER_CHECK_NAME …
#define VALID_OBJC_OBJECT_CHECK_NAME …
static const char g_valid_pointer_check_text[] = …;
ClangDynamicCheckerFunctions::ClangDynamicCheckerFunctions()
: … { … }
ClangDynamicCheckerFunctions::~ClangDynamicCheckerFunctions() = default;
llvm::Error ClangDynamicCheckerFunctions::Install(
DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx) { … }
bool ClangDynamicCheckerFunctions::DoCheckersExplainStop(lldb::addr_t addr,
Stream &message) { … }
static std::string PrintValue(llvm::Value *V, bool truncate = false) { … }
class Instrumenter { … };
class ValidPointerChecker : public Instrumenter { … };
class ObjcObjectChecker : public Instrumenter { … };
IRDynamicChecks::IRDynamicChecks(
ClangDynamicCheckerFunctions &checker_functions, const char *func_name)
: … { … }
IRDynamicChecks::~IRDynamicChecks() = default;
bool IRDynamicChecks::runOnModule(llvm::Module &M) { … }
void IRDynamicChecks::assignPassManager(PMStack &PMS, PassManagerType T) { … }
PassManagerType IRDynamicChecks::getPotentialPassManagerType() const { … }