From 3c70d38d1f5bec30876f7cf93e192d36cccdc3c9 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 18 May 2016 22:04:57 +0000 Subject: [PATCH] Update for llvm change. llvm-svn: 269989 --- clang/lib/CodeGen/BackendUtil.cpp | 2 +- clang/lib/Driver/Tools.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 5a1db6c06819..0c95eb573c59 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -528,7 +528,7 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) { llvm::join(TargetOpts.Features.begin(), TargetOpts.Features.end(), ","); // Keep this synced with the equivalent code in tools/driver/cc1as_main.cpp. - llvm::Reloc::Model RM = llvm::Reloc::Default; + llvm::Optional RM; if (CodeGenOpts.RelocationModel == "static") { RM = llvm::Reloc::Static; } else if (CodeGenOpts.RelocationModel == "pic") { diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index bcc2af8fc002..8a1cb541c1b0 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -3609,8 +3609,6 @@ ParsePICArgs(const ToolChain &ToolChain, const llvm::Triple &Triple, static const char *RelocationModelName(llvm::Reloc::Model Model) { switch (Model) { - case llvm::Reloc::Default: - return nullptr; case llvm::Reloc::Static: return "static"; case llvm::Reloc::PIC_: