There should no need for null checks in the AsmPrinter
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Event Timeline
Comment Actions
Add a test which this may fix. If MCTargetStreamer is not used (e.g. always guarded by a if-nullptr check), createX86NullTargetStreamer is not needed.
clang/test/Misc/x86-emit-codegen-only.c | ||
---|---|---|
5 | This should use a llvm/test/MC or llvm/test/CodeGen test. |
llvm/lib/Target/X86/MCTargetDesc/X86TargetStreamer.h | ||
---|---|---|
41 | Why not create a X86TargetNullStreamer class and keep X86TargetStreamer as it is? |
llvm/lib/Target/X86/MCTargetDesc/X86TargetStreamer.h | ||
---|---|---|
41 | That's a lot of extra boilerplate to do nothing |
llvm/lib/Target/X86/MCTargetDesc/X86TargetStreamer.h | ||
---|---|---|
41 | OK - I see WebAssemblyTargetNullStreamer does override but I don't think its vital. |
This should use a llvm/test/MC or llvm/test/CodeGen test.