[llvm] r238311 - We always have an InstPrinter.
Rafael EspĂndola
rafael.espindola at gmail.com
Wed May 27 10:33:07 PDT 2015
>> --- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
>> +++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Wed May 27 07:13:06 2015
>> @@ -65,8 +65,9 @@ public:
>> AsmBackend(asmbackend), CommentStream(CommentToEmit),
>> IsVerboseAsm(isVerboseAsm), ShowInst(showInst),
>> UseDwarfDirectory(useDwarfDirectory) {
>> - if (InstPrinter && IsVerboseAsm)
>> - InstPrinter->setCommentStream(CommentStream);
>> + assert(InstPrinter);
>> + if (IsVerboseAsm)
>> + InstPrinter->setCommentStream(CommentStream);
>> }
>
>
> Why the assert here?If there's a reason, why not in the other chunks too?
It is the constructor, so it is the first code path that gets hit.
Cheers,
Rafael
More information about the llvm-commits
mailing list