1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Use the verbose asm flag instead of a new flag for decoding the LSDA.

llvm-svn: 133292
This commit is contained in:
Bill Wendling 2011-06-17 20:55:01 +00:00
parent 0cec5ab356
commit 1d4e48661b
7 changed files with 11 additions and 25 deletions

View File

@ -557,8 +557,7 @@ namespace llvm {
MCInstPrinter *InstPrint = 0, MCInstPrinter *InstPrint = 0,
MCCodeEmitter *CE = 0, MCCodeEmitter *CE = 0,
TargetAsmBackend *TAB = 0, TargetAsmBackend *TAB = 0,
bool ShowInst = false, bool ShowInst = false);
bool DecodeLSDA = false);
/// createMachOStreamer - Create a machine code streamer which will generate /// createMachOStreamer - Create a machine code streamer which will generate
/// Mach-O format object files. /// Mach-O format object files.

View File

@ -47,8 +47,7 @@ namespace llvm {
MCInstPrinter *InstPrint, MCInstPrinter *InstPrint,
MCCodeEmitter *CE, MCCodeEmitter *CE,
TargetAsmBackend *TAB, TargetAsmBackend *TAB,
bool ShowInst, bool ShowInst);
bool DecodeLSDA);
/// Target - Wrapper for Target specific information. /// Target - Wrapper for Target specific information.
/// ///
@ -101,8 +100,7 @@ namespace llvm {
MCInstPrinter *InstPrint, MCInstPrinter *InstPrint,
MCCodeEmitter *CE, MCCodeEmitter *CE,
TargetAsmBackend *TAB, TargetAsmBackend *TAB,
bool ShowInst, bool ShowInst);
bool DecodeLSDA);
private: private:
/// Next - The next registered target in the linked list, maintained by the /// Next - The next registered target in the linked list, maintained by the
@ -336,11 +334,10 @@ namespace llvm {
MCInstPrinter *InstPrint, MCInstPrinter *InstPrint,
MCCodeEmitter *CE, MCCodeEmitter *CE,
TargetAsmBackend *TAB, TargetAsmBackend *TAB,
bool ShowInst, bool ShowInst) const {
bool DecodeLSDA) const {
// AsmStreamerCtorFn is default to llvm::createAsmStreamer // AsmStreamerCtorFn is default to llvm::createAsmStreamer
return AsmStreamerCtorFn(Ctx, OS, isVerboseAsm, useLoc, useCFI, return AsmStreamerCtorFn(Ctx, OS, isVerboseAsm, useLoc, useCFI,
InstPrint, CE, TAB, ShowInst, DecodeLSDA); InstPrint, CE, TAB, ShowInst);
} }
/// @} /// @}

View File

@ -72,8 +72,6 @@ static cl::opt<bool> ShowMCEncoding("show-mc-encoding", cl::Hidden,
cl::desc("Show encoding in .s output")); cl::desc("Show encoding in .s output"));
static cl::opt<bool> ShowMCInst("show-mc-inst", cl::Hidden, static cl::opt<bool> ShowMCInst("show-mc-inst", cl::Hidden,
cl::desc("Show instruction structure in .s output")); cl::desc("Show instruction structure in .s output"));
static cl::opt<bool> DecodeMCLSDA("decode-mc-lsda", cl::Hidden,
cl::desc("Print LSDA in human readable format in .s output"));
static cl::opt<bool> EnableMCLogging("enable-mc-api-logging", cl::Hidden, static cl::opt<bool> EnableMCLogging("enable-mc-api-logging", cl::Hidden,
cl::desc("Enable MC API logging")); cl::desc("Enable MC API logging"));
static cl::opt<bool> VerifyMachineCode("verify-machineinstrs", cl::Hidden, static cl::opt<bool> VerifyMachineCode("verify-machineinstrs", cl::Hidden,
@ -154,8 +152,7 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
hasMCUseCFI(), hasMCUseCFI(),
InstPrinter, InstPrinter,
MCE, TAB, MCE, TAB,
ShowMCInst, ShowMCInst);
DecodeMCLSDA);
AsmStreamer.reset(S); AsmStreamer.reset(S);
break; break;
} }

View File

@ -1605,8 +1605,8 @@ MCStreamer *llvm::createAsmStreamer(MCContext &Context,
bool isVerboseAsm, bool useLoc, bool isVerboseAsm, bool useLoc,
bool useCFI, MCInstPrinter *IP, bool useCFI, MCInstPrinter *IP,
MCCodeEmitter *CE, TargetAsmBackend *TAB, MCCodeEmitter *CE, TargetAsmBackend *TAB,
bool ShowInst, bool DecodeLSDA) { bool ShowInst) {
if (DecodeLSDA) if (isVerboseAsm)
return new MCLSDADecoderAsmStreamer(Context, OS, isVerboseAsm, useLoc, return new MCLSDADecoderAsmStreamer(Context, OS, isVerboseAsm, useLoc,
useCFI, IP, CE, TAB, ShowInst); useCFI, IP, CE, TAB, ShowInst);

View File

@ -533,8 +533,7 @@ namespace llvm {
bool isVerboseAsm, bool useLoc, bool useCFI, bool isVerboseAsm, bool useLoc, bool useCFI,
MCInstPrinter *IP, MCInstPrinter *IP,
MCCodeEmitter *CE, TargetAsmBackend *TAB, MCCodeEmitter *CE, TargetAsmBackend *TAB,
bool ShowInst, bool ShowInst) {
bool /*DecodeLSDA*/) {
return new PTXMCAsmStreamer(Context, OS, isVerboseAsm, useLoc, return new PTXMCAsmStreamer(Context, OS, isVerboseAsm, useLoc,
IP, CE, ShowInst); IP, CE, ShowInst);
} }

View File

@ -27,8 +27,7 @@ namespace llvm {
MCInstPrinter *InstPrint, MCInstPrinter *InstPrint,
MCCodeEmitter *CE, MCCodeEmitter *CE,
TargetAsmBackend *TAB, TargetAsmBackend *TAB,
bool ShowInst, bool ShowInst);
bool DecodeLSDA);
} }
extern "C" void LLVMInitializePTXTarget() { extern "C" void LLVMInitializePTXTarget() {

View File

@ -61,10 +61,6 @@ static cl::opt<bool>
ShowInstOperands("show-inst-operands", ShowInstOperands("show-inst-operands",
cl::desc("Show instructions operands as parsed")); cl::desc("Show instructions operands as parsed"));
static cl::opt<bool>
DecodeLSDA("decode-lsda",
cl::desc("Print LSDA in human readable format"));
static cl::opt<unsigned> static cl::opt<unsigned>
OutputAsmVariant("output-asm-variant", OutputAsmVariant("output-asm-variant",
cl::desc("Syntax variant to use for output printing")); cl::desc("Syntax variant to use for output printing"));
@ -361,8 +357,7 @@ static int AssembleInput(const char *ProgName) {
Str.reset(TheTarget->createAsmStreamer(Ctx, FOS, /*asmverbose*/true, Str.reset(TheTarget->createAsmStreamer(Ctx, FOS, /*asmverbose*/true,
/*useLoc*/ true, /*useLoc*/ true,
/*useCFI*/ true, IP, CE, TAB, /*useCFI*/ true, IP, CE, TAB,
ShowInst, ShowInst));
DecodeLSDA));
} else if (FileType == OFT_Null) { } else if (FileType == OFT_Null) {
Str.reset(createNullStreamer(Ctx)); Str.reset(createNullStreamer(Ctx));
} else { } else {