From d2d3ebb81992e107edf95c1c136d7a342d9b1418 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 16 Apr 2017 16:03:39 +0000 Subject: Vendor import of lld trunk r300422: https://llvm.org/svn/llvm-project/lld/trunk@300422 --- lib/Core/TargetOptionsCommandFlags.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 lib/Core/TargetOptionsCommandFlags.cpp (limited to 'lib/Core/TargetOptionsCommandFlags.cpp') diff --git a/lib/Core/TargetOptionsCommandFlags.cpp b/lib/Core/TargetOptionsCommandFlags.cpp new file mode 100644 index 000000000000..e0f26761e705 --- /dev/null +++ b/lib/Core/TargetOptionsCommandFlags.cpp @@ -0,0 +1,32 @@ +//===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===// +// +// The LLVM Linker +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file exists as a place for global variables defined in LLVM's +// CodeGen/CommandFlags.h. By putting the resulting object file in +// an archive and linking with it, the definitions will automatically be +// included when needed and skipped when already present. +// +//===----------------------------------------------------------------------===// + +#include "lld/Core/TargetOptionsCommandFlags.h" + +#include "llvm/CodeGen/CommandFlags.h" +#include "llvm/Target/TargetOptions.h" + +// Define an externally visible version of +// InitTargetOptionsFromCodeGenFlags, so that its functionality can be +// used without having to include llvm/CodeGen/CommandFlags.h, which +// would lead to multiple definitions of the command line flags. +llvm::TargetOptions lld::InitTargetOptionsFromCodeGenFlags() { + return ::InitTargetOptionsFromCodeGenFlags(); +} + +llvm::CodeModel::Model lld::GetCodeModelFromCMModel() { + return CMModel; +} -- cgit v1.3