summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetMachineC.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-05-18 22:04:49 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-05-18 22:04:49 +0000
commit8c34dd82575920209d18f9fb93634886f7edbe26 (patch)
treec82ae227c389c91d5c0576c84ac0b57e5d527b18 /llvm/lib/Target/TargetMachineC.cpp
parentaa7d2d781b5b477ed8751c037c899f7c54e94522 (diff)
downloadbcm5719-llvm-8c34dd82575920209d18f9fb93634886f7edbe26.tar.gz
bcm5719-llvm-8c34dd82575920209d18f9fb93634886f7edbe26.zip
Delete Reloc::Default.
Having an enum member named Default is quite confusing: Is it distinct from the others? This patch removes that member and instead uses Optional<Reloc> in places where we have a user input that still hasn't been maped to the default value, which is now clear has no be one of the remaining 3 options. llvm-svn: 269988
Diffstat (limited to 'llvm/lib/Target/TargetMachineC.cpp')
-rw-r--r--llvm/lib/Target/TargetMachineC.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/TargetMachineC.cpp b/llvm/lib/Target/TargetMachineC.cpp
index 208c59c5f47..02836eaf08e 100644
--- a/llvm/lib/Target/TargetMachineC.cpp
+++ b/llvm/lib/Target/TargetMachineC.cpp
@@ -105,7 +105,7 @@ LLVMTargetMachineRef LLVMCreateTargetMachine(LLVMTargetRef T,
const char* Triple, const char* CPU, const char* Features,
LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc,
LLVMCodeModel CodeModel) {
- Reloc::Model RM;
+ Optional<Reloc::Model> RM;
switch (Reloc){
case LLVMRelocStatic:
RM = Reloc::Static;
@@ -117,7 +117,6 @@ LLVMTargetMachineRef LLVMCreateTargetMachine(LLVMTargetRef T,
RM = Reloc::DynamicNoPIC;
break;
default:
- RM = Reloc::Default;
break;
}
OpenPOWER on IntegriCloud