Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/CodeGen/CGExpr.cpp
Show First 20 Lines • Show All 3,291 Lines • ▼ Show 20 Lines | |||||
void CodeGenFunction::EmitCheck( | void CodeGenFunction::EmitCheck( | ||||
ArrayRef<std::pair<llvm::Value *, SanitizerMask>> Checked, | ArrayRef<std::pair<llvm::Value *, SanitizerMask>> Checked, | ||||
SanitizerHandler CheckHandler, ArrayRef<llvm::Constant *> StaticArgs, | SanitizerHandler CheckHandler, ArrayRef<llvm::Constant *> StaticArgs, | ||||
ArrayRef<llvm::Value *> DynamicArgs) { | ArrayRef<llvm::Value *> DynamicArgs) { | ||||
assert(IsSanitizerScope); | assert(IsSanitizerScope); | ||||
assert(Checked.size() > 0); | assert(Checked.size() > 0); | ||||
assert(CheckHandler >= 0 && | assert(CheckHandler >= 0 && | ||||
size_t(CheckHandler) < llvm::array_lengthof(SanitizerHandlers)); | size_t(CheckHandler) < std::size(SanitizerHandlers)); | ||||
const StringRef CheckName = SanitizerHandlers[CheckHandler].Name; | const StringRef CheckName = SanitizerHandlers[CheckHandler].Name; | ||||
llvm::Value *FatalCond = nullptr; | llvm::Value *FatalCond = nullptr; | ||||
llvm::Value *RecoverableCond = nullptr; | llvm::Value *RecoverableCond = nullptr; | ||||
llvm::Value *TrapCond = nullptr; | llvm::Value *TrapCond = nullptr; | ||||
for (int i = 0, n = Checked.size(); i < n; ++i) { | for (int i = 0, n = Checked.size(); i < n; ++i) { | ||||
llvm::Value *Check = Checked[i].first; | llvm::Value *Check = Checked[i].first; | ||||
// -fsanitize-trap= overrides -fsanitize-recover=. | // -fsanitize-trap= overrides -fsanitize-recover=. | ||||
▲ Show 20 Lines • Show All 2,348 Lines • Show Last 20 Lines |