[cfe-commits] r135425 - /cfe/trunk/tools/driver/cc1as_main.cpp
Evan Cheng
evan.cheng at apple.com
Mon Jul 18 13:57:51 PDT 2011
Author: evancheng
Date: Mon Jul 18 15:57:51 2011
New Revision: 135425
URL: http://llvm.org/viewvc/llvm-project?rev=135425&view=rev
Log:
MCContext now takes MCRegisterInfo.
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=135425&r1=135424&r2=135425&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1as_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1as_main.cpp Mon Jul 18 15:57:51 2011
@@ -30,6 +30,7 @@
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCInstrInfo.h"
+#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/Support/CommandLine.h"
@@ -259,6 +260,9 @@
OwningPtr<MCAsmInfo> MAI(TheTarget->createMCAsmInfo(Opts.Triple));
assert(MAI && "Unable to create target asm info!");
+ OwningPtr<MCRegisterInfo> MRI(TheTarget->createMCRegInfo(Opts.Triple));
+ assert(MRI && "Unable to create target register info!");
+
bool IsBinary = Opts.OutputType == AssemblerInvocation::FT_Obj;
formatted_raw_ostream *Out = GetOutputStream(Opts, Diags, IsBinary);
if (!Out)
@@ -273,7 +277,7 @@
}
const TargetAsmInfo *tai = new TargetAsmInfo(*TM);
- MCContext Ctx(*MAI, tai);
+ MCContext Ctx(*MAI, *MRI, tai);
if (Opts.SaveTemporaryLabels)
Ctx.setAllowTemporaryLabels(false);
@@ -358,6 +362,7 @@
InitializeAllTargets();
InitializeAllMCAsmInfos();
InitializeAllMCInstrInfos();
+ InitializeAllMCRegisterInfos();
InitializeAllMCSubtargetInfos();
InitializeAllAsmPrinters();
InitializeAllAsmParsers();
More information about the cfe-commits
mailing list