[llvm] [SPIRV] Add a `SPIRVTypeInst` type with some guardrails (PR #179947)

Juan Manuel Martinez Caamaño via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 10 04:33:57 PST 2026


jmmartinez wrote:

> > I see your point. Then adding `[[deprecated]]` would be a good idea. To at least have something bothering us and get things moving.
> > I've tried it and we get a bunch of:
> > ```shell
> > _llvm/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h:28:7: note: declared here
> >    28 | using SPIRVType [[deprecated]] = const MachineInstr;
> >       |       ^~~~~~~~~
> > _llvm/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h:679:62: warning: ‘using SPIRVType = const class llvm::MachineInstr’ is deprecated [-Wdeprecated-declarations]
> >   679 |   const TargetRegisterClass *getRegClass(SPIRVType *SpvType) const;
> >       |                                                              ^~~~~
> > _llvm/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h:28:7: note: declared here
> >    28 | using SPIRVType [[deprecated]] = const MachineInstr;
> >       |       ^~~~~~~~~
> > _llvm/llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h:680:38: warning: ‘using SPIRVType = const class llvm::MachineInstr’ is deprecated [-Wdeprecated-declarations]
> >   680 |   LLT getRegType(SPIRVType *SpvType) const;
> > ...
> > ```
> 
> We need confirmation from everyone that this doesn't break any build. I wouldn't be surprised if some release builds use `-Werror`. If that is okay for everyone, I'm happy with that.

Some buildbots build with `-Werror` :(

https://github.com/llvm/llvm-project/pull/179947


More information about the llvm-commits mailing list