summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-09-09 16:29:13 +0000
committerJustin Lebar <jlebar@google.com>2016-09-09 16:29:13 +0000
commitaa4adccc4dd2800aa15b5628a0ca77013c37ea53 (patch)
treedc9b2288caeb77a529e4982f49681e97acea2fd6
parentc9404e103935abbada1a13fc0861247051538c23 (diff)
downloadbcm5719-llvm-aa4adccc4dd2800aa15b5628a0ca77013c37ea53.tar.gz
bcm5719-llvm-aa4adccc4dd2800aa15b5628a0ca77013c37ea53.zip
Attempt to fix static_asserts in SelectionDAGNodes.h that MSVC chokes on.
These were added in r281051, which, I am embarrassed to admit, has an incomplete commit message that I forgot to update before pushing. You can ignore element (2) in that list. llvm-svn: 281054
-rw-r--r--llvm/include/llvm/CodeGen/SelectionDAGNodes.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
index a1dca4946b4..c38481a3a48 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -472,20 +472,15 @@ protected:
StoreSDNodeBitfields StoreSDNodeBits;
};
- // RawSDNodeBits must cover the entirety of the union. This means that all
- // of the union's members must have size <= RawSDNodeBits.
- static_assert(sizeof(SDNodeBits) <= sizeof(RawSDNodeBits),
- "SDNodeBits too wide");
- static_assert(sizeof(ConstantSDNodeBits) <= sizeof(RawSDNodeBits),
- "ConstantSDNodeBits too wide");
- static_assert(sizeof(MemSDNodeBits) <= sizeof(RawSDNodeBits),
- "MemSDNodeBits too wide");
- static_assert(sizeof(LSBaseSDNodeBits) <= sizeof(RawSDNodeBits),
- "LSBaseSDNodeBits too wide");
- static_assert(sizeof(LoadSDNodeBits) <= sizeof(RawSDNodeBits),
- "LoadSDNodeBits too wide");
- static_assert(sizeof(StoreSDNodeBits) <= sizeof(RawSDNodeBits),
- "StoreSDNodeBits too wide");
+ // RawSDNodeBits must cover the entirety of the union. This means that all of
+ // the union's members must have size <= RawSDNodeBits. We write the RHS as
+ // "2" instead of sizeof(RawSDNodeBits) because MSVC can't handle the latter.
+ static_assert(sizeof(SDNodeBitfields) <= 2, "field too wide");
+ static_assert(sizeof(ConstantSDNodeBitfields) <= 2, "field too wide");
+ static_assert(sizeof(MemSDNodeBitfields) <= 2, "field too wide");
+ static_assert(sizeof(LSBaseSDNodeBitfields) <= 2, "field too wide");
+ static_assert(sizeof(LoadSDNodeBitfields) <= 2, "field too wide");
+ static_assert(sizeof(StoreSDNodeBitfields) <= 2, "field too wide");
private:
/// Unique id per SDNode in the DAG.
OpenPOWER on IntegriCloud