summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2018-07-10 08:58:12 +0000
committerDean Michael Berris <dberris@google.com>2018-07-10 08:58:12 +0000
commit8230abc187d82136966d81ecb15c1c9dda6d69fa (patch)
tree2a4dce5567dce17ad64805897c92328b5125d082 /lib
parent652950651ff6b1748fa97d152e670c2f92902e50 (diff)
[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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336648 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/xray/xray_function_call_trie.h2
-rw-r--r--lib/xray/xray_utils.h2
2 files changed, 1 insertions, 3 deletions
diff --git a/lib/xray/xray_function_call_trie.h b/lib/xray/xray_function_call_trie.h
index 5ad822795..6c4710584 100644
--- a/lib/xray/xray_function_call_trie.h
+++ b/lib/xray/xray_function_call_trie.h
@@ -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;
diff --git a/lib/xray/xray_utils.h b/lib/xray/xray_utils.h
index 0a7911f12..ce64528f9 100644
--- a/lib/xray/xray_utils.h
+++ b/lib/xray/xray_utils.h
@@ -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));
}