diff options
Diffstat (limited to 'include/llvm/CodeGen/CommandFlags.h')
-rw-r--r-- | include/llvm/CodeGen/CommandFlags.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/CommandFlags.h b/include/llvm/CodeGen/CommandFlags.h index 38d2e7166737..9bc1442b258d 100644 --- a/include/llvm/CodeGen/CommandFlags.h +++ b/include/llvm/CodeGen/CommandFlags.h @@ -48,10 +48,7 @@ MAttrs("mattr", cl::opt<Reloc::Model> RelocModel( "relocation-model", cl::desc("Choose relocation model"), - cl::init(Reloc::Default), cl::values( - clEnumValN(Reloc::Default, "default", - "Target default relocation model"), clEnumValN(Reloc::Static, "static", "Non-relocatable code"), clEnumValN(Reloc::PIC_, "pic", "Fully relocatable, position independent code"), @@ -59,6 +56,14 @@ cl::opt<Reloc::Model> RelocModel( "Relocatable external references, non-relocatable code"), clEnumValEnd)); +static inline Optional<Reloc::Model> getRelocModel() { + if (RelocModel.getNumOccurrences()) { + Reloc::Model R = RelocModel; + return R; + } + return None; +} + cl::opt<ThreadModel::Model> TMModel("thread-model", cl::desc("Choose threading model"), |