This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo][test] Check specific func name to ignore codegen differences
ClosedPublic

Authored by jsji on May 17 2021, 2:23 PM.

Details

Summary

We use CHECK-LABEL: define to divide input stream into functions,
this works well on most platforms.

But there are cases that some platforms (eg: AIX) may have different
codegen , especially for global constructor and descructors.

On AIX, the codegen will have two more functions: dtor_b,
finalize_b, which will fail the test.

The fix is to use specific function name so that we can safely ignore
those unrelated codegen differences.

Diff Detail

Event Timeline

jsji requested review of this revision.May 17 2021, 2:23 PM
jsji created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2021, 2:23 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dblaikie added inline comments.May 17 2021, 3:18 PM
clang/test/CodeGenCXX/debug-info-line.cpp
149

Probably flesh that out a bit. Maybe define{{.*}}f11?

jsji updated this revision to Diff 346011.May 17 2021, 4:08 PM

Address comments.

jsji marked an inline comment as done.May 17 2021, 4:08 PM
jsji added inline comments.
clang/test/CodeGenCXX/debug-info-line.cpp
149

Good idea.

dblaikie accepted this revision.May 17 2021, 8:36 PM

Looks good, thanks!

This revision is now accepted and ready to land.May 17 2021, 8:36 PM
This revision was automatically updated to reflect the committed changes.
jsji marked an inline comment as done.