summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-06-04 23:26:06 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-06-04 23:26:06 +0000
commit028f7fd1c3bdd484588bfb22d3d2cd5372e8e427 (patch)
tree524640708133e37bb93872cf04fde90f73b87738 /lib/CodeGen/CGExpr.cpp
parent7546b5a26229417222909d8c4c6e12d50c27e985 (diff)
downloadclang-028f7fd1c3bdd484588bfb22d3d2cd5372e8e427.tar.gz
clang-028f7fd1c3bdd484588bfb22d3d2cd5372e8e427.tar.bz2
clang-028f7fd1c3bdd484588bfb22d3d2cd5372e8e427.tar.xz
Formatting cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210219 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index e43e61c946..e77c4b048a 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -2220,9 +2220,9 @@ void CodeGenFunction::EmitCheck(llvm::Value *Checked, StringRef CheckName,
ArgTypes.push_back(IntPtrTy);
}
- bool Recover = (RecoverKind == CRK_AlwaysRecoverable) ||
- ((RecoverKind == CRK_Recoverable) &&
- CGM.getCodeGenOpts().SanitizeRecover);
+ bool Recover = RecoverKind == CRK_AlwaysRecoverable ||
+ (RecoverKind == CRK_Recoverable &&
+ CGM.getCodeGenOpts().SanitizeRecover);
llvm::FunctionType *FnType =
llvm::FunctionType::get(CGM.VoidTy, ArgTypes, false);
@@ -2234,15 +2234,14 @@ void CodeGenFunction::EmitCheck(llvm::Value *Checked, StringRef CheckName,
B.addAttribute(llvm::Attribute::UWTable);
// Checks that have two variants use a suffix to differentiate them
- bool NeedsAbortSuffix = (RecoverKind != CRK_Unrecoverable) &&
- !CGM.getCodeGenOpts().SanitizeRecover;
+ bool NeedsAbortSuffix = RecoverKind != CRK_Unrecoverable &&
+ !CGM.getCodeGenOpts().SanitizeRecover;
std::string FunctionName = ("__ubsan_handle_" + CheckName +
(NeedsAbortSuffix? "_abort" : "")).str();
- llvm::Value *Fn =
- CGM.CreateRuntimeFunction(FnType, FunctionName,
- llvm::AttributeSet::get(getLLVMContext(),
- llvm::AttributeSet::FunctionIndex,
- B));
+ llvm::Value *Fn = CGM.CreateRuntimeFunction(
+ FnType, FunctionName,
+ llvm::AttributeSet::get(getLLVMContext(),
+ llvm::AttributeSet::FunctionIndex, B));
llvm::CallInst *HandlerCall = EmitNounwindRuntimeCall(Fn, Args);
if (Recover) {
Builder.CreateBr(Cont);