[llvm] [SandboxIR] Boilerplate code (PR #95814)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 17 11:33:27 PDT 2024
vporpo wrote:
> It is missing tests.
There are tons of unit tests for all SandboxIR classes, but they will have to wait for a couple of patches. They will be part of the patches that introduce the Context class which owns the SandboxIR objects, including the SandboxIR Value.
> Could you instead put everything into namespace llvm::sandboxir
This is an option, and is probably nicer for the user of the API. But I am a bit concerned about the internals of SandboxIR: Given that this class hierarchy mirrors the LLVM IR one it could make the code within the SandboxIR classes quite confusing and error-prone because we are used to writing LLVM-IR code without the `llvm::` prefix. For example consider the SandboxIR Value class:
```
namespace SB {
class Value {
Value *V; // <- This points to SB::Value, not llvm::Value
};
}
```
Wdyt?
https://github.com/llvm/llvm-project/pull/95814
More information about the llvm-commits
mailing list