forked from OSchip/llvm-project
5c6b1a6dfd
Summary: The following example gives the error message "expected value of type 'bits<32>', got 'bit'" on the assignment. class Instruction { bits<32> encoding; } def foo: Instruction { let encoding{10} = !eq(0, 1); } But there's nothing wrong with this code: 'bit' is a perfectly good type for the RHS of an assignment to a //single bit// of an instruction encoding. The problem is that `ParseBodyItem` is accidentally type-checking the RHS against the full type of the `encoding` field, without adjusting it in the case where we're only assigning to a subset of the bits. The fix is trivial. Reviewers: nhaehnle, hfinkel Reviewed By: hfinkel Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74220 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Error.cpp | ||
JSONBackend.cpp | ||
LLVMBuild.txt | ||
Main.cpp | ||
Record.cpp | ||
SetTheory.cpp | ||
StringMatcher.cpp | ||
TGLexer.cpp | ||
TGLexer.h | ||
TGParser.cpp | ||
TGParser.h | ||
TableGenBackend.cpp |