LLVM API Documentation
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/InstIterator.h"
#include "llvm/Support/TargetFolder.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetLibraryInfo.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "bounds-checking" |
Typedefs | |
typedef IRBuilder< true, TargetFolder > | BuilderTy |
Functions | |
STATISTIC (ChecksAdded,"Bounds checks added") | |
STATISTIC (ChecksSkipped,"Bounds checks skipped") | |
STATISTIC (ChecksUnable,"Bounds checks unable to add") | |
INITIALIZE_PASS (BoundsChecking,"bounds-checking","Run-time bounds checking", false, false) BasicBlock *BoundsChecking | |
Variables | |
static cl::opt< bool > | SingleTrapBB ("bounds-checking-single-trap", cl::desc("Use one trap block per function")) |
#define DEBUG_TYPE "bounds-checking" |
Definition at line 15 of file BoundsChecking.cpp.
typedef IRBuilder<true, TargetFolder> BuilderTy |
Definition at line 38 of file BoundsChecking.cpp.
getTrapBB - create a basic block that traps. All overflowing conditions branch to this block. There's only one trap block per function.
Definition at line 72 of file BoundsChecking.cpp.
References llvm::BasicBlock::Create(), F(), llvm::Function::getContext(), llvm::Intrinsic::getDeclaration(), llvm::GlobalValue::getParent(), llvm::CallInst::setDoesNotReturn(), SingleTrapBB, and llvm::Intrinsic::trap.
STATISTIC | ( | ChecksAdded | , |
"Bounds checks added" | |||
) |
STATISTIC | ( | ChecksSkipped | , |
"Bounds checks skipped" | |||
) |
STATISTIC | ( | ChecksUnable | , |
"Bounds checks unable to add" | |||
) |
|
static |
Referenced by INITIALIZE_PASS().