llvm.org GIT mirror llvm / 5330482
Try to get rid of a -wunitialized warning: explicitly initialize the pointer to NULL and use asserts to check in relevant places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176134 91177308-0d34-0410-b5e6-96231b3b80d8 Eli Bendersky 7 years ago
1 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
426426 OwningPtr
427427 STI(TheTarget->createMCSubtargetInfo(TripleName, MCPU, FeaturesStr));
428428
429 MCInstPrinter *IP;
429 MCInstPrinter *IP = NULL;
430430 if (FileType == OFT_AssemblyFile) {
431431 IP =
432432 TheTarget->createMCInstPrinter(OutputAsmVariant, *MAI, *MCII, *MRI, *STI);
464464 Res = AssembleInput(ProgName, TheTarget, SrcMgr, Ctx, *Str, *MAI, *STI);
465465 break;
466466 case AC_MDisassemble:
467 assert(IP && "Expected assembly output");
467468 IP->setUseMarkup(1);
468469 disassemble = true;
469470 break;
470471 case AC_HDisassemble:
472 assert(IP && "Expected assembly output");
471473 IP->setPrintImmHex(1);
472474 disassemble = true;
473475 break;