diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-07-18 20:57:51 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-07-18 20:57:51 +0000 |
commit | 884744b65ec9d1669e145985bf1830e727c04952 (patch) | |
tree | 43129b0c42fdf2f3f3dcdfa687da61caaf1fd639 /tools/driver | |
parent | 1fba8281b9fab5bf11c4083e88f31047413f94f2 (diff) |
MCContext now takes MCRegisterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/driver')
-rw-r--r-- | tools/driver/cc1as_main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp index 358d746986..bfe2301b61 100644 --- a/tools/driver/cc1as_main.cpp +++ b/tools/driver/cc1as_main.cpp @@ -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 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, Diagnostic &Diags) { 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 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, Diagnostic &Diags) { } 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 @@ int cc1as_main(const char **ArgBegin, const char **ArgEnd, InitializeAllTargets(); InitializeAllMCAsmInfos(); InitializeAllMCInstrInfos(); + InitializeAllMCRegisterInfos(); InitializeAllMCSubtargetInfos(); InitializeAllAsmPrinters(); InitializeAllAsmParsers(); |