diff options
author | Serge Guelton <sguelton@quarkslab.com> | 2017-05-09 19:31:13 +0000 |
---|---|---|
committer | Serge Guelton <sguelton@quarkslab.com> | 2017-05-09 19:31:13 +0000 |
commit | e38003f8399531b00e9fc8e9c6cfe311bc3ad4fb (patch) | |
tree | 55325a133bbc8a4fd616f0d9a3c5bdffae94e02a /llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | |
parent | f570c76c5cc9afbda73b7c34ef3dec8332fee02a (diff) | |
download | bcm5719-llvm-e38003f8399531b00e9fc8e9c6cfe311bc3ad4fb.tar.gz bcm5719-llvm-e38003f8399531b00e9fc8e9c6cfe311bc3ad4fb.zip |
Suppress all uses of LLVM_END_WITH_NULL. NFC.
Use variadic templates instead of relying on <cstdarg> + sentinel.
This enforces better type checking and makes code more readable.
Differential Revision: https://reviews.llvm.org/D32541
llvm-svn: 302571
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp index 8786781933e..a882a5c9bdc 100644 --- a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp @@ -388,7 +388,7 @@ FunctionType *DataFlowSanitizer::getArgsFunctionType(FunctionType *T) { ArgTypes.push_back(ShadowPtrTy); Type *RetType = T->getReturnType(); if (!RetType->isVoidTy()) - RetType = StructType::get(RetType, ShadowTy, (Type *)nullptr); + RetType = StructType::get(RetType, ShadowTy); return FunctionType::get(RetType, ArgTypes, T->isVarArg()); } @@ -476,16 +476,14 @@ bool DataFlowSanitizer::doInitialization(Module &M) { GetArgTLS = ConstantExpr::getIntToPtr( ConstantInt::get(IntptrTy, uintptr_t(GetArgTLSPtr)), PointerType::getUnqual( - FunctionType::get(PointerType::getUnqual(ArgTLSTy), - (Type *)nullptr))); + FunctionType::get(PointerType::getUnqual(ArgTLSTy), (Type*)nullptr))); } if (GetRetvalTLSPtr) { RetvalTLS = nullptr; GetRetvalTLS = ConstantExpr::getIntToPtr( ConstantInt::get(IntptrTy, uintptr_t(GetRetvalTLSPtr)), PointerType::getUnqual( - FunctionType::get(PointerType::getUnqual(ShadowTy), - (Type *)nullptr))); + FunctionType::get(PointerType::getUnqual(ShadowTy), (Type*)nullptr))); } ColdCallWeights = MDBuilder(*Ctx).createBranchWeights(1, 1000); |