Remove the CFIEnforcing flag from TargetOptions as it is unused.
authorEric Christopher <echristo@gmail.com>
Sun, 19 Apr 2015 03:20:59 +0000 (03:20 +0000)
committerEric Christopher <echristo@gmail.com>
Sun, 19 Apr 2015 03:20:59 +0000 (03:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235267 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/CommandFlags.h
include/llvm/Target/TargetOptions.h
lib/CodeGen/TargetOptionsImpl.cpp

index ef3e88b5ca29397d6a82f284cc334edb896386a8..ccd1bb3bb0bcc405f6b270b1ee66c18b87af2dea 100644 (file)
@@ -231,11 +231,6 @@ FCFI("fcfi",
      cl::desc("Apply forward-edge control-flow integrity"),
      cl::init(false));
 
-cl::opt<bool>
-CFIEnforcing("cfi-enforcing",
-             cl::desc("Enforce CFI or pass the violation to a function."),
-             cl::init(false));
-
 // Note that this option is linked to the cfi-enforcing option above: if
 // cfi-enforcing is set, then the cfi-func-name option is entirely ignored. If
 // cfi-enforcing is false and no cfi-func-name is set, then a default function
@@ -280,8 +275,6 @@ static inline TargetOptions InitTargetOptionsFromCodeGenFlags() {
   Options.MCOptions = InitMCTargetOptionsFromFlags();
   Options.JTType = JTableType;
   Options.FCFI = FCFI;
-  Options.CFIEnforcing = CFIEnforcing;
-  Options.CFIFuncName = CFIFuncName;
 
   Options.ThreadModel = TMModel;
 
index 5c63588767ec251d94b93ad6c0575ac55e27c455..b41fcdb149e4e2fda486e2c8955769d4376a3875 100644 (file)
@@ -74,7 +74,7 @@ namespace llvm {
           TrapFuncName(), FloatABIType(FloatABI::Default),
           AllowFPOpFusion(FPOpFusion::Standard), JTType(JumpTable::Single),
           FCFI(false), ThreadModel(ThreadModel::POSIX),
-          CFIEnforcing(false), CFIFuncName() {}
+          CFIFuncName() {}
 
     /// PrintMachineCode - This flag is enabled when the -print-machineinstrs
     /// option is specified on the command line, and should enable debugging
@@ -230,10 +230,6 @@ namespace llvm {
     /// for things like atomics
     ThreadModel::Model ThreadModel;
 
-    /// CFIEnforcing - This flags controls whether or not CFI violations cause
-    /// the program to halt.
-    bool CFIEnforcing;
-
     /// getCFIFuncName - If this returns a non-empty string, then this is the
     /// name of the function that will be called for each CFI violation in
     /// non-enforcing mode.
@@ -270,7 +266,6 @@ inline bool operator==(const TargetOptions &LHS,
     ARE_EQUAL(JTType) &&
     ARE_EQUAL(FCFI) &&
     ARE_EQUAL(ThreadModel) &&
-    ARE_EQUAL(CFIEnforcing) &&
     ARE_EQUAL(CFIFuncName) &&
     ARE_EQUAL(MCOptions);
 #undef ARE_EQUAL
index 618d903a0904a7ff268274804e4cebf899381693..41c66bb8dc256afa3dfe3cb54442bf1f3ccaf885 100644 (file)
@@ -53,8 +53,7 @@ StringRef TargetOptions::getTrapFunctionName() const {
 }
 
 /// getCFIFuncName - If this returns a non-empty string, then it is the name of
-/// the function that gets called on CFI violations in CFI non-enforcing mode
-/// (!TargetOptions::CFIEnforcing).
+/// the function that gets called on CFI violations in CFI non-enforcing mode.
 StringRef TargetOptions::getCFIFuncName() const {
   return CFIFuncName;
 }