[llvm] f865947 - [rtsan] Fix warnings after #101232

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 8 16:43:25 PDT 2024


Author: Fangrui Song
Date: 2024-08-08T16:43:20-07:00
New Revision: f86594788ce93b696675c94f54016d27a6c21d18

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

LOG: [rtsan] Fix warnings after #101232

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/Instrumentation/RealtimeSanitizer.h
    llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/Instrumentation/RealtimeSanitizer.h b/llvm/include/llvm/Transforms/Instrumentation/RealtimeSanitizer.h
index b141ad27996b7..f2ce1636551ce 100644
--- a/llvm/include/llvm/Transforms/Instrumentation/RealtimeSanitizer.h
+++ b/llvm/include/llvm/Transforms/Instrumentation/RealtimeSanitizer.h
@@ -31,9 +31,6 @@ class RealtimeSanitizerPass : public PassInfoMixin<RealtimeSanitizerPass> {
   PreservedAnalyses run(Function &F, AnalysisManager<Function> &AM);
 
   static bool isRequired() { return true; }
-
-private:
-  RealtimeSanitizerOptions Options{};
 };
 
 } // namespace llvm

diff  --git a/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp
index d3028ee97c3eb..5663f446613b5 100644
--- a/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp
@@ -41,13 +41,12 @@ static void insertCallAtAllFunctionExitPoints(Function &Fn,
                                               const char *InsertFnName) {
   for (auto &BB : Fn)
     for (auto &I : BB)
-      if (auto *RI = dyn_cast<ReturnInst>(&I))
+      if (isa<ReturnInst>(&I))
         insertCallBeforeInstruction(Fn, I, InsertFnName);
 }
 
 RealtimeSanitizerPass::RealtimeSanitizerPass(
-    const RealtimeSanitizerOptions &Options)
-    : Options{Options} {}
+    const RealtimeSanitizerOptions &Options) {}
 
 PreservedAnalyses RealtimeSanitizerPass::run(Function &F,
                                              AnalysisManager<Function> &AM) {


        


More information about the llvm-commits mailing list