From 1e3dec662ea18131c495db50caccc57f77b7a5fe Mon Sep 17 00:00:00 2001 From: rdivacky Date: Thu, 27 May 2010 15:15:58 +0000 Subject: Update LLVM to r104832. --- tools/llvm-mc/llvm-mc.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tools/llvm-mc/llvm-mc.cpp') diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index 47f67c5..a114ab0 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -58,6 +58,9 @@ OutputAsmVariant("output-asm-variant", static cl::opt RelaxAll("mc-relax-all", cl::desc("Relax all fixups")); +static cl::opt +EnableLogging("enable-api-logging", cl::desc("Enable MC API logging")); + enum OutputFileType { OFT_Null, OFT_AssemblyFile, @@ -75,9 +78,6 @@ FileType("filetype", cl::init(OFT_AssemblyFile), "Emit a native object ('.o') file"), clEnumValEnd)); -static cl::opt -Force("f", cl::desc("Enable binary output on terminals")); - static cl::list IncludeDirs("I", cl::desc("Directory of include files"), cl::value_desc("directory"), cl::Prefix); @@ -304,7 +304,12 @@ static int AssembleInput(const char *ProgName) { assert(FileType == OFT_ObjectFile && "Invalid file type!"); CE.reset(TheTarget->createCodeEmitter(*TM, Ctx)); TAB.reset(TheTarget->createAsmBackend(TripleName)); - Str.reset(createMachOStreamer(Ctx, *TAB, *Out, CE.get(), RelaxAll)); + Str.reset(TheTarget->createObjectStreamer(TripleName, Ctx, *TAB, + *Out, CE.get(), RelaxAll)); + } + + if (EnableLogging) { + Str.reset(createLoggingStreamer(Str.take(), errs())); } AsmParser Parser(SrcMgr, Ctx, *Str.get(), *MAI); -- cgit v1.1