1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/TableGen/BitsInitOverflow.td
Nicolai Haehnle b28dc096d7 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

llvm-svn: 326786
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
}