[cfe-commits] r121460 - /cfe/trunk/tools/driver/cc1as_main.cpp
Rafael Espindola
rafael.espindola at gmail.com
Thu Dec 9 20:01:06 PST 2010
Author: rafael
Date: Thu Dec 9 22:01:05 2010
New Revision: 121460
URL: http://llvm.org/viewvc/llvm-project?rev=121460&view=rev
Log:
Revert my previous patch to make the valgrind bots happy.
Modified:
cfe/trunk/tools/driver/cc1as_main.cpp
Modified: cfe/trunk/tools/driver/cc1as_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1as_main.cpp?rev=121460&r1=121459&r2=121460&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1as_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1as_main.cpp Thu Dec 9 22:01:05 2010
@@ -44,11 +44,8 @@
#include "llvm/Support/Signals.h"
#include "llvm/Support/system_error.h"
#include "llvm/Target/TargetAsmBackend.h"
-#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/TargetAsmParser.h"
#include "llvm/Target/TargetData.h"
-#include "llvm/Target/TargetLowering.h"
-#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegistry.h"
#include "llvm/Target/TargetSelect.h"
@@ -248,6 +245,7 @@
OwningPtr<MCAsmInfo> MAI(TheTarget->createAsmInfo(Opts.Triple));
assert(MAI && "Unable to create target asm info!");
+ MCContext Ctx(*MAI);
bool IsBinary = Opts.OutputType == AssemblerInvocation::FT_Obj;
formatted_raw_ostream *Out = GetOutputStream(Opts, Diags, IsBinary);
if (!Out)
@@ -260,25 +258,16 @@
return false;
}
- const TargetAsmInfo tai(*TM);
- MCContext Ctx(*MAI, &tai);
-
OwningPtr<MCStreamer> Str;
- const TargetLoweringObjectFile &TLOF =
- TM->getTargetLowering()->getObjFileLowering();
- const_cast<TargetLoweringObjectFile&>(TLOF).Initialize(Ctx, *TM);
-
-
if (Opts.OutputType == AssemblerInvocation::FT_Asm) {
MCInstPrinter *IP =
TheTarget->createMCInstPrinter(Opts.OutputAsmVariant, *MAI);
MCCodeEmitter *CE = 0;
if (Opts.ShowEncoding)
CE = TheTarget->createCodeEmitter(*TM, Ctx);
- Str.reset(TheTarget->createAsmStreamer(Ctx, *Out, /*asmverbose*/true,
- /*useLoc*/ true, IP, CE,
- Opts.ShowInst));
+ Str.reset(createAsmStreamer(Ctx, *Out,TM->getTargetData()->isLittleEndian(),
+ /*asmverbose*/true, IP, CE, Opts.ShowInst));
} else if (Opts.OutputType == AssemblerInvocation::FT_Null) {
Str.reset(createNullStreamer(Ctx));
} else {
More information about the cfe-commits
mailing list