change MCContext to always have an MCAsmInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98293 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-03-11 22:53:35 +00:00
parent 42263e2e40
commit c18409aed8
6 changed files with 24 additions and 15 deletions

View File

@@ -242,7 +242,11 @@ static int AssembleInput(const char *ProgName) {
// it later.
SrcMgr.setIncludeDirs(IncludeDirs);
MCContext Ctx;
const MCAsmInfo *MAI = TheTarget->createAsmInfo(TripleName);
assert(MAI && "Unable to create target asm info!");
MCContext Ctx(*MAI);
formatted_raw_ostream *Out = GetOutputStream();
if (!Out)
return 1;
@@ -262,9 +266,6 @@ static int AssembleInput(const char *ProgName) {
OwningPtr<MCStreamer> Str;
OwningPtr<TargetAsmBackend> TAB;
const MCAsmInfo *MAI = TheTarget->createAsmInfo(TripleName);
assert(MAI && "Unable to create target asm info!");
if (FileType == OFT_AssemblyFile) {
IP.reset(TheTarget->createMCInstPrinter(OutputAsmVariant, *MAI, *Out));
if (ShowEncoding)