8 Commits

Author SHA1 Message Date
Guillaume Chatelet
b908f329d0 [Alignment] Add a None() member function
Summary:
This will allow writing `if(A != llvm::Align::None())` which is clearer than `if(A > llvm::Align(1))`

This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67697

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372207 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-18 09:24:40 +00:00
Simon Pilgrim
87f08b7e5c [LLVM][Alignment] Fix MSVC potential division by 0 warning (PR42911)
Original Patch by @gchatelet (Guillaume Chatelet)

Differential Revision: https://reviews.llvm.org/D65859

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369016 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-15 16:34:23 +00:00
Guillaume Chatelet
0557373d00 [LLVM][Alignment] Introduce Alignment In GlobalObject
Summary:
This is patch is part of a serie to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: jfb

Subscribers: hiraditya, dexonsmith, llvm-commits, courbet

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65748

Address comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368000 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-06 09:03:21 +00:00
Bill Wendling
e5f80bd819 Add brackets to remove warnings about ambiguous 'else's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367740 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-03 00:26:10 +00:00
Guillaume Chatelet
ea78572ea0 [LLVM][Alignment] Fix AlignmentTest on platform where size_t != uint64_t
Reviewers: yroux

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65563

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367532 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 09:20:00 +00:00
Guillaume Chatelet
e650828b52 [LLVM] Fix Alignment death tests in Release Mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367427 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-31 12:47:20 +00:00
Guillaume Chatelet
d2d1fedc77 Fix mismatching vector type in AlignmentTest.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367404 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-31 10:00:48 +00:00
Guillaume Chatelet
195c36a624 [LLVM][NFC] Adding an Alignment type to LLVM
Summary:
This patch introduces a type to straighten LLVM's alignment management.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html

The next step is to use this type throughout LLVM

Reviewers: jfb, jakehehrlich

Subscribers: mgorny, mgrang, dexonsmith, llvm-commits, courbet

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64790

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367393 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-31 08:27:42 +00:00