llvm.org GIT mirror llvm / 46e3c5a
Remove CFIFuncName from TargetOptions as it is currently unused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235268 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 5 years ago
3 changed file(s) with 1 addition(s) and 30 deletion(s). Raw diff Collapse all Expand all
229229 FCFI("fcfi",
230230 cl::desc("Apply forward-edge control-flow integrity"),
231231 cl::init(false));
232
233 // Note that this option is linked to the cfi-enforcing option above: if
234 // cfi-enforcing is set, then the cfi-func-name option is entirely ignored. If
235 // cfi-enforcing is false and no cfi-func-name is set, then a default function
236 // will be generated that ignores all CFI violations. The expected signature for
237 // functions called with CFI violations is
238 //
239 // void (i8*, i8*)
240 //
241 // The first pointer is a C string containing the name of the function in which
242 // the violation occurs, and the second pointer is the pointer that violated
243 // CFI.
244 cl::opt
245 CFIFuncName("cfi-func-name", cl::desc("The name of the CFI function to call"),
246 cl::init(""));
247232
248233 // Common utility function tightly tied to the options listed here. Initializes
249234 // a TargetOptions object with CodeGen flags and returns it.
7272 DataSections(false), UniqueSectionNames(true), TrapUnreachable(false),
7373 TrapFuncName(), FloatABIType(FloatABI::Default),
7474 AllowFPOpFusion(FPOpFusion::Standard), JTType(JumpTable::Single),
75 FCFI(false), ThreadModel(ThreadModel::POSIX),
76 CFIFuncName() {}
75 FCFI(false), ThreadModel(ThreadModel::POSIX) {}
7776
7877 /// PrintMachineCode - This flag is enabled when the -print-machineinstrs
7978 /// option is specified on the command line, and should enable debugging
228227 /// ThreadModel - This flag specifies the type of threading model to assume
229228 /// for things like atomics
230229 ThreadModel::Model ThreadModel;
231
232 /// getCFIFuncName - If this returns a non-empty string, then this is the
233 /// name of the function that will be called for each CFI violation in
234 /// non-enforcing mode.
235 std::string CFIFuncName;
236 StringRef getCFIFuncName() const;
237230
238231 /// Machine level options.
239232 MCTargetOptions MCOptions;
265258 ARE_EQUAL(JTType) &&
266259 ARE_EQUAL(FCFI) &&
267260 ARE_EQUAL(ThreadModel) &&
268 ARE_EQUAL(CFIFuncName) &&
269261 ARE_EQUAL(MCOptions);
270262 #undef ARE_EQUAL
271263 }
5050 StringRef TargetOptions::getTrapFunctionName() const {
5151 return TrapFuncName;
5252 }
53
54 /// getCFIFuncName - If this returns a non-empty string, then it is the name of
55 /// the function that gets called on CFI violations in CFI non-enforcing mode.
56 StringRef TargetOptions::getCFIFuncName() const {
57 return CFIFuncName;
58 }