Files
archived-llvm/test/TableGen/BitsInitOverflow.td
Nicolai Haehnle 19ebaa70e5 TableGen: Explicitly check whether a record has been resolved
Summary:
There are various places where resolving and constant folds can
get stuck, especially around casts. We don't always signal an
error for those, because in many cases they can legitimately
occur without being an error in the "untaken branch" of an !if.

Change-Id: I3befc0e4234c8e6cc61190504702918c9f29ce5c

Reviewers: arsenm, craig.topper, tra, MartinO

Subscribers: wdng, llvm-commits

Differential Revision: https://reviews.llvm.org/D43754

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326786 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-06 13:48:47 +00:00

10 lines
265 B
TableGen

// RUN: not llvm-tblgen %s 2>&1 | FileCheck %s
// Check that a large integer is not truncated to a small bit sequence.
//
// CHECK: error: Initializer of 'X' in 'anonymous_0' could not be fully resolved:
def {
bits<2> X = 5; // bitfield is too small, reject
}