From d2e3ddad1442a0c69e917d45ad821e98338d4bf1 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Sun, 19 Apr 2015 03:21:04 +0000 Subject: [PATCH] Remove CFIFuncName from TargetOptions as it is currently unused. llvm-svn: 235268 --- llvm/include/llvm/CodeGen/CommandFlags.h | 15 --------------- llvm/include/llvm/Target/TargetOptions.h | 10 +--------- llvm/lib/CodeGen/TargetOptionsImpl.cpp | 6 ------ 3 files changed, 1 insertion(+), 30 deletions(-) diff --git a/llvm/include/llvm/CodeGen/CommandFlags.h b/llvm/include/llvm/CodeGen/CommandFlags.h index ccd1bb3bb0bc..cc0a487a0f25 100644 --- a/llvm/include/llvm/CodeGen/CommandFlags.h +++ b/llvm/include/llvm/CodeGen/CommandFlags.h @@ -231,21 +231,6 @@ FCFI("fcfi", cl::desc("Apply forward-edge control-flow integrity"), 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 -// will be generated that ignores all CFI violations. The expected signature for -// functions called with CFI violations is -// -// void (i8*, i8*) -// -// The first pointer is a C string containing the name of the function in which -// the violation occurs, and the second pointer is the pointer that violated -// CFI. -cl::opt -CFIFuncName("cfi-func-name", cl::desc("The name of the CFI function to call"), - cl::init("")); - // Common utility function tightly tied to the options listed here. Initializes // a TargetOptions object with CodeGen flags and returns it. static inline TargetOptions InitTargetOptionsFromCodeGenFlags() { diff --git a/llvm/include/llvm/Target/TargetOptions.h b/llvm/include/llvm/Target/TargetOptions.h index b41fcdb149e4..ba7bd162dce4 100644 --- a/llvm/include/llvm/Target/TargetOptions.h +++ b/llvm/include/llvm/Target/TargetOptions.h @@ -73,8 +73,7 @@ namespace llvm { DataSections(false), UniqueSectionNames(true), TrapUnreachable(false), TrapFuncName(), FloatABIType(FloatABI::Default), AllowFPOpFusion(FPOpFusion::Standard), JTType(JumpTable::Single), - FCFI(false), ThreadModel(ThreadModel::POSIX), - CFIFuncName() {} + FCFI(false), ThreadModel(ThreadModel::POSIX) {} /// PrintMachineCode - This flag is enabled when the -print-machineinstrs /// option is specified on the command line, and should enable debugging @@ -230,12 +229,6 @@ namespace llvm { /// for things like atomics ThreadModel::Model ThreadModel; - /// 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. - std::string CFIFuncName; - StringRef getCFIFuncName() const; - /// Machine level options. MCTargetOptions MCOptions; }; @@ -266,7 +259,6 @@ inline bool operator==(const TargetOptions &LHS, ARE_EQUAL(JTType) && ARE_EQUAL(FCFI) && ARE_EQUAL(ThreadModel) && - ARE_EQUAL(CFIFuncName) && ARE_EQUAL(MCOptions); #undef ARE_EQUAL } diff --git a/llvm/lib/CodeGen/TargetOptionsImpl.cpp b/llvm/lib/CodeGen/TargetOptionsImpl.cpp index 41c66bb8dc25..3ca2017550cf 100644 --- a/llvm/lib/CodeGen/TargetOptionsImpl.cpp +++ b/llvm/lib/CodeGen/TargetOptionsImpl.cpp @@ -51,9 +51,3 @@ bool TargetOptions::HonorSignDependentRoundingFPMath() const { StringRef TargetOptions::getTrapFunctionName() const { return TrapFuncName; } - -/// 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. -StringRef TargetOptions::getCFIFuncName() const { - return CFIFuncName; -}