diff options
author | Davide Italiano <davide@freebsd.org> | 2017-04-01 21:07:07 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2017-04-01 21:07:07 +0000 |
commit | 1a3665bb828c28781ade8252a40d6d5a682fcd66 (patch) | |
tree | 85ddb1cf90da81dea650d9caa88abda408be37ae /clang/lib/CodeGen/BackendUtil.cpp | |
parent | 278ebd2f98bd43cbf5db427cba4df660e591ff2b (diff) | |
download | llvm-1a3665bb828c28781ade8252a40d6d5a682fcd66.zip llvm-1a3665bb828c28781ade8252a40d6d5a682fcd66.tar.gz llvm-1a3665bb828c28781ade8252a40d6d5a682fcd66.tar.bz2 |
[Driver] Don't crash on invalid values of -mrelocation-model=.
This is handled in a similar way we handle invalid -mcode-model.
PR: 31840
llvm-svn: 299315
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 874fd14..855d679 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -323,7 +323,8 @@ static llvm::CodeModel::Model getCodeModel(const CodeGenOptions &CodeGenOpts) { } static llvm::Reloc::Model getRelocModel(const CodeGenOptions &CodeGenOpts) { - // Keep this synced with the equivalent code in tools/driver/cc1as_main.cpp. + // Keep this synced with the equivalent code in + // lib/Frontend/CompilerInvocation.cpp llvm::Optional<llvm::Reloc::Model> RM; RM = llvm::StringSwitch<llvm::Reloc::Model>(CodeGenOpts.RelocationModel) .Case("static", llvm::Reloc::Static) |