Page MenuHomePhabricator

[Clang] Plan 9 member resolution
Needs ReviewPublic

Authored by ksaunders on Jul 31 2022, 3:16 PM.

Details

Reviewers
rsmith
Summary

This patch implements the Plan 9 member resolution algorithm which is described referenced in the original revision: https://reviews.llvm.org/D127462. The test code is illustrative as to what is considered valid, as it was derived from samples compiled using the Plan 9 C compiler.

It is not clear what the policy on issuing diagnostics is for extensions usage, so there is a warning emitted for usage of duplicated members (which is a Plan 9 extension). However this might not be a good idea, as there could be potentially a large number of warnings emitted, as this is used throughout headers Plan 9 C.

Diff Detail

Unit TestsFailed

TimeTest
70 msx64 debian > LLVM.Examples/IRTransforms/SimplifyCFG::tut-simplify-cfg2-dead-block-order.ll
Script: -- : 'RUN: at line 2'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/opt -tut-simplifycfg -tut-simplifycfg-version=v1 -enable-new-pm=0 -S < /var/lib/buildkite-agent/builds/llvm-project/llvm/test/Examples/IRTransforms/SimplifyCFG/tut-simplify-cfg2-dead-block-order.ll | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck /var/lib/buildkite-agent/builds/llvm-project/llvm/test/Examples/IRTransforms/SimplifyCFG/tut-simplify-cfg2-dead-block-order.ll