1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

Rename MCTargetOptionsCommandFlags.h to .def as it is not a normal/modular header as much as it is for stamping out some global/static variables

llvm-svn: 319086
This commit is contained in:
David Blaikie 2017-11-27 19:55:16 +00:00
parent 038ffd6e20
commit 1247dd5951
7 changed files with 20 additions and 21 deletions

View File

@ -17,7 +17,7 @@
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.def"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/CommandLine.h"

View File

@ -19,7 +19,7 @@
#include "llvm/Support/CommandLine.h"
using namespace llvm;
cl::opt<MCTargetOptions::AsmInstrumentation> AsmInstrumentation(
static cl::opt<MCTargetOptions::AsmInstrumentation> AsmInstrumentation(
"asm-instrumentation", cl::desc("Instrumentation of inline assembly and "
"assembly source files"),
cl::init(MCTargetOptions::AsmInstrumentationNone),
@ -28,40 +28,40 @@ cl::opt<MCTargetOptions::AsmInstrumentation> AsmInstrumentation(
clEnumValN(MCTargetOptions::AsmInstrumentationAddress, "address",
"instrument instructions with memory arguments")));
cl::opt<bool> RelaxAll("mc-relax-all",
static cl::opt<bool> RelaxAll("mc-relax-all",
cl::desc("When used with filetype=obj, "
"relax all fixups in the emitted object file"));
cl::opt<bool> IncrementalLinkerCompatible(
static cl::opt<bool> IncrementalLinkerCompatible(
"incremental-linker-compatible",
cl::desc(
"When used with filetype=obj, "
"emit an object file which can be used with an incremental linker"));
cl::opt<bool> PIECopyRelocations("pie-copy-relocations", cl::desc("PIE Copy Relocations"));
static cl::opt<bool> PIECopyRelocations("pie-copy-relocations", cl::desc("PIE Copy Relocations"));
cl::opt<int> DwarfVersion("dwarf-version", cl::desc("Dwarf version"),
static cl::opt<int> DwarfVersion("dwarf-version", cl::desc("Dwarf version"),
cl::init(0));
cl::opt<bool> ShowMCInst("asm-show-inst",
static cl::opt<bool> ShowMCInst("asm-show-inst",
cl::desc("Emit internal instruction representation to "
"assembly file"));
cl::opt<bool> FatalWarnings("fatal-warnings",
static cl::opt<bool> FatalWarnings("fatal-warnings",
cl::desc("Treat warnings as errors"));
cl::opt<bool> NoWarn("no-warn", cl::desc("Suppress all warnings"));
cl::alias NoWarnW("W", cl::desc("Alias for --no-warn"), cl::aliasopt(NoWarn));
static cl::opt<bool> NoWarn("no-warn", cl::desc("Suppress all warnings"));
static cl::alias NoWarnW("W", cl::desc("Alias for --no-warn"), cl::aliasopt(NoWarn));
cl::opt<bool> NoDeprecatedWarn("no-deprecated-warn",
static cl::opt<bool> NoDeprecatedWarn("no-deprecated-warn",
cl::desc("Suppress all deprecated warnings"));
cl::opt<std::string>
static cl::opt<std::string>
ABIName("target-abi", cl::Hidden,
cl::desc("The name of the ABI to be targeted from the backend."),
cl::init(""));
static inline MCTargetOptions InitMCTargetOptionsFromFlags() {
static MCTargetOptions InitMCTargetOptionsFromFlags() {
MCTargetOptions Options;
Options.SanitizeAddress =
(AsmInstrumentation == MCTargetOptions::AsmInstrumentationAddress);

View File

@ -55,7 +55,7 @@
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.def"
#include "llvm/Object/MachO.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Object/SymbolicFile.h"

View File

@ -29,7 +29,7 @@
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.def"
#include "llvm/Object/Decompressor.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/Compression.h"

View File

@ -24,7 +24,7 @@
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.def"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileUtilities.h"

View File

@ -26,7 +26,7 @@
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.def"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compression.h"
#include "llvm/Support/FileUtilities.h"

View File

@ -27,7 +27,7 @@
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.def"
#include "llvm/PassAnalysisSupport.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/TargetRegistry.h"
@ -155,8 +155,8 @@ llvm::Error dwarfgen::Generator::init(Triple TheTriple, uint16_t V) {
MC.reset(new MCContext(MAI.get(), MRI.get(), MOFI.get()));
MOFI->InitMCObjectFileInfo(TheTriple, /*PIC*/ false, *MC);
MCTargetOptions Options;
MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, "", Options);
MCTargetOptions MCOptions = InitMCTargetOptionsFromFlags();
MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, "", MCOptions);
if (!MAB)
return make_error<StringError>("no asm backend for target " + TripleName,
inconvertibleErrorCode());
@ -179,7 +179,6 @@ llvm::Error dwarfgen::Generator::init(Triple TheTriple, uint16_t V) {
Stream = make_unique<raw_svector_ostream>(FileBytes);
MCTargetOptions MCOptions = InitMCTargetOptionsFromFlags();
MS = TheTarget->createMCObjectStreamer(
TheTriple, *MC, std::unique_ptr<MCAsmBackend>(MAB), *Stream,
std::unique_ptr<MCCodeEmitter>(MCE), *MSTI, MCOptions.MCRelaxAll,