mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-07 00:23:43 +00:00
Changed Opts.EABIVersion type string to llvm::EABI enum class
Summary: Changed EABIVersion type from string to llvm::EABI. It seems it was just a typo and this is intended implementation. Differential Revision: https://reviews.llvm.org/D34595 llvm-svn: 306953
This commit is contained in:
parent
ef1c2ba22a
commit
dc771509a4
@ -18,6 +18,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "clang/Basic/OpenCLOptions.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
|
||||
namespace clang {
|
||||
|
||||
@ -41,7 +42,7 @@ public:
|
||||
std::string ABI;
|
||||
|
||||
/// The EABI version to use
|
||||
std::string EABIVersion;
|
||||
llvm::EABI EABIVersion;
|
||||
|
||||
/// If given, the version string of the linker in use.
|
||||
std::string LinkerVersion;
|
||||
|
@ -5443,7 +5443,7 @@ public:
|
||||
if (Triple.getOS() == llvm::Triple::Linux ||
|
||||
Triple.getOS() == llvm::Triple::UnknownOS)
|
||||
this->MCountName =
|
||||
Opts.EABIVersion == "gnu" ? "\01__gnu_mcount_nc" : "\01mcount";
|
||||
Opts.EABIVersion == llvm::EABI::GNU ? "\01__gnu_mcount_nc" : "\01mcount";
|
||||
}
|
||||
|
||||
StringRef getABI() const override { return ABI; }
|
||||
@ -6283,7 +6283,7 @@ public:
|
||||
if (Triple.getOS() == llvm::Triple::Linux)
|
||||
this->MCountName = "\01_mcount";
|
||||
else if (Triple.getOS() == llvm::Triple::UnknownOS)
|
||||
this->MCountName = Opts.EABIVersion == "gnu" ? "\01_mcount" : "mcount";
|
||||
this->MCountName = Opts.EABIVersion == llvm::EABI::GNU ? "\01_mcount" : "mcount";
|
||||
}
|
||||
|
||||
StringRef getABI() const override { return ABI; }
|
||||
|
@ -415,11 +415,7 @@ static void initTargetOptions(llvm::TargetOptions &Options,
|
||||
Options.RelaxELFRelocations = CodeGenOpts.RelaxELFRelocations;
|
||||
|
||||
// Set EABI version.
|
||||
Options.EABIVersion = llvm::StringSwitch<llvm::EABI>(TargetOpts.EABIVersion)
|
||||
.Case("4", llvm::EABI::EABI4)
|
||||
.Case("5", llvm::EABI::EABI5)
|
||||
.Case("gnu", llvm::EABI::GNU)
|
||||
.Default(llvm::EABI::Default);
|
||||
Options.EABIVersion = TargetOpts.EABIVersion;
|
||||
|
||||
if (LangOpts.SjLjExceptions)
|
||||
Options.ExceptionModel = llvm::ExceptionHandling::SjLj;
|
||||
|
@ -2568,7 +2568,7 @@ static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args,
|
||||
Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args)
|
||||
<< Value;
|
||||
else
|
||||
Opts.EABIVersion = Value;
|
||||
Opts.EABIVersion = EABIVersion;
|
||||
}
|
||||
Opts.CPU = Args.getLastArgValue(OPT_target_cpu);
|
||||
Opts.FPMath = Args.getLastArgValue(OPT_mfpmath);
|
||||
|
Loading…
Reference in New Issue
Block a user