forked from OSchip/llvm-project
[mips] Add an assert in getTargetStreamer()
Check if the TargetStreamer can be accessed. Differential Revision: https://reviews.llvm.org/D71477
This commit is contained in:
parent
d518f1da6d
commit
d7efa6b198
|
@ -134,6 +134,8 @@ namespace {
|
|||
|
||||
class MipsAsmParser : public MCTargetAsmParser {
|
||||
MipsTargetStreamer &getTargetStreamer() {
|
||||
assert(getParser().getStreamer().getTargetStreamer() &&
|
||||
"do not have a target streamer");
|
||||
MCTargetStreamer &TS = *getParser().getStreamer().getTargetStreamer();
|
||||
return static_cast<MipsTargetStreamer &>(TS);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue