#include "SafeStackLayout.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
usingnamespacellvm;
usingnamespacellvm::safestack;
#define DEBUG_TYPE …
static cl::opt<bool> ClLayout("safe-stack-layout",
cl::desc("enable safe stack layout"), cl::Hidden,
cl::init(true));
LLVM_DUMP_METHOD void StackLayout::print(raw_ostream &OS) { … }
void StackLayout::addObject(const Value *V, unsigned Size, Align Alignment,
const StackLifetime::LiveRange &Range) { … }
static unsigned AdjustStackOffset(unsigned Offset, unsigned Size,
Align Alignment) { … }
void StackLayout::layoutObject(StackObject &Obj) { … }
void StackLayout::computeLayout() { … }