[LiveDebugValues] Prevent some misuse of LocIndex::fromRawInteger, NFC
authorVedant Kumar <vsk@apple.com>
Tue, 3 Mar 2020 00:56:17 +0000 (16:56 -0800)
committerVedant Kumar <vsk@apple.com>
Tue, 3 Mar 2020 00:59:09 +0000 (16:59 -0800)
commitd64a22a2add97ff1ae28acb18c9f6ea76a26ecf3
tree442ade2b52db01fec3ed7780922bd0c6eb215ab7
parent29a4239d31c6d8ccc557afbe0999aa096ca95cc6
[LiveDebugValues] Prevent some misuse of LocIndex::fromRawInteger, NFC

Make it a compile-time error to pass an int/unsigned/etc to
fromRawInteger.

Hopefully this prevents errors of the form:

```
for (unsigned ID : getVarLocs()) {
  auto VL = LocMap[LocIndex::fromRawInteger(ID)];
  ...
```
llvm/lib/CodeGen/LiveDebugValues.cpp