mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-07 04:17:21 +00:00
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
This commit is contained in:
parent
616025007a
commit
533048228f
@ -427,7 +427,7 @@ int main(int argc, char **argv) {
|
||||
OwningPtr<MCSubtargetInfo>
|
||||
STI(TheTarget->createMCSubtargetInfo(TripleName, MCPU, FeaturesStr));
|
||||
|
||||
MCInstPrinter *IP;
|
||||
MCInstPrinter *IP = NULL;
|
||||
if (FileType == OFT_AssemblyFile) {
|
||||
IP =
|
||||
TheTarget->createMCInstPrinter(OutputAsmVariant, *MAI, *MCII, *MRI, *STI);
|
||||
@ -465,10 +465,12 @@ int main(int argc, char **argv) {
|
||||
Res = AssembleInput(ProgName, TheTarget, SrcMgr, Ctx, *Str, *MAI, *STI);
|
||||
break;
|
||||
case AC_MDisassemble:
|
||||
assert(IP && "Expected assembly output");
|
||||
IP->setUseMarkup(1);
|
||||
disassemble = true;
|
||||
break;
|
||||
case AC_HDisassemble:
|
||||
assert(IP && "Expected assembly output");
|
||||
IP->setPrintImmHex(1);
|
||||
disassemble = true;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user