From: Eric Christopher Date: Sun, 19 Apr 2015 03:20:55 +0000 (+0000) Subject: Remove the CFIType TargetOption as it is unused. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1b1dbcda430d4bd73534ee8318585bc2c6c8ed56;p=oota-llvm.git Remove the CFIType TargetOption as it is unused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235266 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/CommandFlags.h b/include/llvm/CodeGen/CommandFlags.h index 9f86429cbf1..ef3e88b5ca2 100644 --- a/include/llvm/CodeGen/CommandFlags.h +++ b/include/llvm/CodeGen/CommandFlags.h @@ -231,19 +231,6 @@ FCFI("fcfi", cl::desc("Apply forward-edge control-flow integrity"), cl::init(false)); -cl::opt -CFIType("cfi-type", - cl::desc("Choose the type of Control-Flow Integrity check to add"), - cl::init(CFIntegrity::Sub), - cl::values( - clEnumValN(CFIntegrity::Sub, "sub", - "Subtract the pointer from the table base, then mask."), - clEnumValN(CFIntegrity::Ror, "ror", - "Use rotate to check the offset from a table base."), - clEnumValN(CFIntegrity::Add, "add", - "Mask out the high bits and add to an aligned base."), - clEnumValEnd)); - cl::opt CFIEnforcing("cfi-enforcing", cl::desc("Enforce CFI or pass the violation to a function."), @@ -293,7 +280,6 @@ static inline TargetOptions InitTargetOptionsFromCodeGenFlags() { Options.MCOptions = InitMCTargetOptionsFromFlags(); Options.JTType = JTableType; Options.FCFI = FCFI; - Options.CFIType = CFIType; Options.CFIEnforcing = CFIEnforcing; Options.CFIFuncName = CFIFuncName; diff --git a/include/llvm/Target/TargetOptions.h b/include/llvm/Target/TargetOptions.h index abffe67c1d3..5c63588767e 100644 --- a/include/llvm/Target/TargetOptions.h +++ b/include/llvm/Target/TargetOptions.h @@ -57,14 +57,6 @@ namespace llvm { }; } - enum class CFIntegrity { - Sub, // Use subtraction-based checks. - Ror, // Use rotation-based checks. - Add // Use addition-based checks. This depends on having - // sufficient alignment in the code and is usually not - // feasible. - }; - class TargetOptions { public: TargetOptions() @@ -82,7 +74,7 @@ namespace llvm { TrapFuncName(), FloatABIType(FloatABI::Default), AllowFPOpFusion(FPOpFusion::Standard), JTType(JumpTable::Single), FCFI(false), ThreadModel(ThreadModel::POSIX), - CFIType(CFIntegrity::Sub), CFIEnforcing(false), CFIFuncName() {} + CFIEnforcing(false), CFIFuncName() {} /// PrintMachineCode - This flag is enabled when the -print-machineinstrs /// option is specified on the command line, and should enable debugging @@ -238,10 +230,6 @@ namespace llvm { /// for things like atomics ThreadModel::Model ThreadModel; - /// CFIType - This flag specifies the type of control-flow integrity check - /// to add as a preamble to indirect calls. - CFIntegrity CFIType; - /// CFIEnforcing - This flags controls whether or not CFI violations cause /// the program to halt. bool CFIEnforcing; @@ -282,7 +270,6 @@ inline bool operator==(const TargetOptions &LHS, ARE_EQUAL(JTType) && ARE_EQUAL(FCFI) && ARE_EQUAL(ThreadModel) && - ARE_EQUAL(CFIType) && ARE_EQUAL(CFIEnforcing) && ARE_EQUAL(CFIFuncName) && ARE_EQUAL(MCOptions);