[llvm] 007d98f - [DFSan] Fix warning: getArgsFunctionType defined but not used

Andrew Browne via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 8 11:58:56 PDT 2021


Author: Andrew Browne
Date: 2021-10-08T11:58:36-07:00
New Revision: 007d98f520cad0fafb829e3919703739c8d171ce

URL: https://github.com/llvm/llvm-project/commit/007d98f520cad0fafb829e3919703739c8d171ce
DIFF: https://github.com/llvm/llvm-project/commit/007d98f520cad0fafb829e3919703739c8d171ce.diff

LOG: [DFSan] Fix warning: getArgsFunctionType defined but not used

Warning introduced in 61ec2148c5a68d870356d6348309e94a2267a1a4

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
index 9b4a3d5bca04..ea9f61db1ced 100644
--- a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
@@ -462,7 +462,6 @@ class DataFlowSanitizer {
   bool isInstrumented(const Function *F);
   bool isInstrumented(const GlobalAlias *GA);
   bool isForceZeroLabels(const Function *F);
-  FunctionType *getArgsFunctionType(FunctionType *T);
   FunctionType *getTrampolineFunctionType(FunctionType *T);
   TransformedFunction getCustomFunctionType(FunctionType *T);
   WrapperKind getWrapperKind(Function *F);
@@ -771,17 +770,6 @@ DataFlowSanitizer::DataFlowSanitizer(
       SpecialCaseList::createOrDie(AllABIListFiles, *vfs::getRealFileSystem()));
 }
 
-FunctionType *DataFlowSanitizer::getArgsFunctionType(FunctionType *T) {
-  SmallVector<Type *, 4> ArgTypes(T->param_begin(), T->param_end());
-  ArgTypes.append(T->getNumParams(), PrimitiveShadowTy);
-  if (T->isVarArg())
-    ArgTypes.push_back(PrimitiveShadowPtrTy);
-  Type *RetType = T->getReturnType();
-  if (!RetType->isVoidTy())
-    RetType = StructType::get(RetType, PrimitiveShadowTy);
-  return FunctionType::get(RetType, ArgTypes, T->isVarArg());
-}
-
 FunctionType *DataFlowSanitizer::getTrampolineFunctionType(FunctionType *T) {
   assert(!T->isVarArg());
   SmallVector<Type *, 4> ArgTypes;


        


More information about the llvm-commits mailing list