From aafcbcd045616b804215fed757acd89c23d9d921 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 20 Jan 2015 15:51:14 +0000 Subject: [PATCH] IR: Store StorageType as an unsigned bitfield Use `unsigned` instead of `StorageType` for the bitfield to prevent MSVC from treating the top bit of the bitfield as a sign bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226570 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/Metadata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/IR/Metadata.h b/include/llvm/IR/Metadata.h index 4d5b61b4cfb..5590bc54881 100644 --- a/include/llvm/IR/Metadata.h +++ b/include/llvm/IR/Metadata.h @@ -51,7 +51,7 @@ protected: enum StorageType { Uniqued, Distinct, Temporary }; /// \brief Storage flag for non-uniqued, otherwise unowned, metadata. - StorageType Storage : 2; + unsigned Storage : 2; // TODO: expose remaining bits to subclasses. unsigned short SubclassData16; -- 2.11.0