[compiler-rt] r336648 - [XRay][compiler-rt] Fixup build breakage
Dean Michael Berris via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 10 01:58:12 PDT 2018
Author: dberris
Date: Tue Jul 10 01:58:12 2018
New Revision: 336648
URL: http://llvm.org/viewvc/llvm-project?rev=336648&view=rev
Log:
[XRay][compiler-rt] Fixup build breakage
Changes:
- Remove static assertion on size of a structure, fails on systems where
pointers aren't 8 bytes.
- Use size_t instead of deducing type of arguments to
`nearest_boundary`.
Follow-up to D48653.
Modified:
compiler-rt/trunk/lib/xray/xray_function_call_trie.h
compiler-rt/trunk/lib/xray/xray_utils.h
Modified: compiler-rt/trunk/lib/xray/xray_function_call_trie.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_function_call_trie.h?rev=336648&r1=336647&r2=336648&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_function_call_trie.h (original)
+++ compiler-rt/trunk/lib/xray/xray_function_call_trie.h Tue Jul 10 01:58:12 2018
@@ -101,8 +101,6 @@ public:
NodeIdPair(Node *N, int32_t F) : NodePtr(N), FId(F) {}
};
- static_assert(sizeof(NodeIdPair) == 16, "Wrong size for NodeIDPair.");
-
using NodeIdPairArray = Array<NodeIdPair>;
using NodeIdPairAllocatorType = NodeIdPairArray::AllocatorType;
Modified: compiler-rt/trunk/lib/xray/xray_utils.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_utils.h?rev=336648&r1=336647&r2=336648&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_utils.h (original)
+++ compiler-rt/trunk/lib/xray/xray_utils.h Tue Jul 10 01:58:12 2018
@@ -42,7 +42,7 @@ constexpr size_t gcd(size_t a, size_t b)
constexpr size_t lcm(size_t a, size_t b) { return a * b / gcd(a, b); }
-template <class T> constexpr T nearest_boundary(T number, T multiple) {
+constexpr size_t nearest_boundary(size_t number, size_t multiple) {
return multiple * ((number / multiple) + (number % multiple ? 1 : 0));
}
More information about the llvm-commits
mailing list