[clang] 723f7d3 - [clang][driver][NFC] Add hasShadowCallStack to SanitizerArgs

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 12 11:01:55 PDT 2023


Author: Paul Kirth
Date: 2023-04-12T18:01:47Z
New Revision: 723f7d3a0891d341b635f31086ae268aadd6d3d6

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

LOG: [clang][driver][NFC] Add hasShadowCallStack to SanitizerArgs

Currently, we can't check if ShadowCallStack is present in Args the same
way we handle other sanitizers. This is preparatory work for planned
driver changes to how we handle ShadowCallStack.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D148031

Added: 
    

Modified: 
    clang/include/clang/Driver/SanitizerArgs.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Driver/SanitizerArgs.h b/clang/include/clang/Driver/SanitizerArgs.h
index 61b7c7f809ae4..5066c4eaf92d8 100644
--- a/clang/include/clang/Driver/SanitizerArgs.h
+++ b/clang/include/clang/Driver/SanitizerArgs.h
@@ -119,6 +119,10 @@ class SanitizerArgs {
     return MemtagMode;
   }
 
+  bool hasShadowCallStack() const {
+    return Sanitizers.has(SanitizerKind::ShadowCallStack);
+  }
+
   bool requiresPIE() const;
   bool needsUnwindTables() const;
   bool needsLTO() const;


        


More information about the cfe-commits mailing list