This is an archive of the discontinued LLVM Phabricator instance.

Factor out split-dwarf test in Generic/empty.ll to it's own test file
ClosedPublic

Authored by rastogishubham on Apr 24 2023, 4:08 PM.

Details

Summary

In llvm/test/DebugInfo/Generic/empty.ll, there are two RUN lines. The second one use the option

-split-dwarf-file=foo.dwo

Since darwin doesn't support split dwarf, we see an assertion when running the test:

Assertion failed: (Section && "Cannot switch to a null section!"), function switchSection, file /Users/buildslave/jenkins/workspace/clang-stage1-RA/llvm-project/llvm/lib/MC/MCStreamer.cpp, line 1238

While there is an XFAIL for darwin in the test, I don't think it is a good practice to run a test on darwin which causes an assertion. This patch is a small refactoring of the test so that the split-dwarf test can be it's own file with an explicit elf triple.

Diff Detail

Event Timeline

rastogishubham created this revision.Apr 24 2023, 4:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 24 2023, 4:08 PM
rastogishubham requested review of this revision.Apr 24 2023, 4:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 24 2023, 4:08 PM
aprantl accepted this revision.Apr 24 2023, 4:12 PM
aprantl added inline comments.
llvm/test/DebugInfo/X86/empty-split-dwarf.ll
1

This is probably redundant now, since we hardcode a triple, but it probably also doesn't hurt.

This revision is now accepted and ready to land.Apr 24 2023, 4:12 PM