mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
Revert my previous patch to make the valgrind bots happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121461 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -24,9 +24,6 @@
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
#include "llvm/Target/SubtargetFeature.h" // FIXME.
|
||||
#include "llvm/Target/TargetAsmInfo.h" // FIXME.
|
||||
#include "llvm/Target/TargetLowering.h" // FIXME.
|
||||
#include "llvm/Target/TargetLoweringObjectFile.h" // FIXME.
|
||||
#include "llvm/Target/TargetMachine.h" // FIXME.
|
||||
#include "llvm/Target/TargetSelect.h"
|
||||
#include "llvm/ADT/OwningPtr.h"
|
||||
@@ -301,6 +298,8 @@ static int AssembleInput(const char *ProgName) {
|
||||
llvm::OwningPtr<MCAsmInfo> MAI(TheTarget->createAsmInfo(TripleName));
|
||||
assert(MAI && "Unable to create target asm info!");
|
||||
|
||||
MCContext Ctx(*MAI);
|
||||
|
||||
// Package up features to be passed to target/subtarget
|
||||
std::string FeaturesStr;
|
||||
if (MCPU.size()) {
|
||||
@@ -322,9 +321,6 @@ static int AssembleInput(const char *ProgName) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const TargetAsmInfo tai(*TM);
|
||||
MCContext Ctx(*MAI, &tai);
|
||||
|
||||
OwningPtr<tool_output_file> Out(GetOutputStream());
|
||||
if (!Out)
|
||||
return 1;
|
||||
@@ -332,18 +328,15 @@ static int AssembleInput(const char *ProgName) {
|
||||
formatted_raw_ostream FOS(Out->os());
|
||||
OwningPtr<MCStreamer> Str;
|
||||
|
||||
const TargetLoweringObjectFile &TLOF =
|
||||
TM->getTargetLowering()->getObjFileLowering();
|
||||
const_cast<TargetLoweringObjectFile&>(TLOF).Initialize(Ctx, *TM);
|
||||
|
||||
if (FileType == OFT_AssemblyFile) {
|
||||
MCInstPrinter *IP =
|
||||
TheTarget->createMCInstPrinter(OutputAsmVariant, *MAI);
|
||||
MCCodeEmitter *CE = 0;
|
||||
if (ShowEncoding)
|
||||
CE = TheTarget->createCodeEmitter(*TM, Ctx);
|
||||
Str.reset(TheTarget->createAsmStreamer(Ctx, FOS, /*asmverbose*/true,
|
||||
/*useLoc*/ true, IP, CE, ShowInst));
|
||||
Str.reset(TheTarget->createAsmStreamer(Ctx, FOS,
|
||||
TM->getTargetData()->isLittleEndian(),
|
||||
/*asmverbose*/true, IP, CE, ShowInst));
|
||||
} else if (FileType == OFT_Null) {
|
||||
Str.reset(createNullStreamer(Ctx));
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user