Add a scaffolding to merge alignment representations.

We are using log2 values and values themselves to represent alignments.
For example, alignment 8 is sometimes represented as 3 (8 == 2^3).
We want to stop using log2 values.

Because both types are regular arithmetic types, we cannot get help from
a compiler to find places we mix two representations. That makes this
merging work surprisingly hard because if I make a mistake, I'll just get
wrong results at runtime (Yay types!). In this patch, I introduced
a class to represents power-of-two values, which is basically an alias
for an integer type.

Once the migration is done, the class will be removed.

llvm-svn: 233232
diff --git a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
index 92385cf..1ae5be4 100644
--- a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
@@ -731,7 +731,7 @@
 
 
 void MachOLinkingContext::addSectionAlignment(StringRef seg, StringRef sect,
-                                                               uint8_t align2) {
+                                              PowerOf2 align2) {
   SectionAlign entry;
   entry.segmentName = seg;
   entry.sectionName = sect;
@@ -740,7 +740,7 @@
 }
 
 bool MachOLinkingContext::sectionAligned(StringRef seg, StringRef sect,
-                                                        uint8_t &align2) const {
+                                         PowerOf2 &align2) const {
   for (const SectionAlign &entry : _sectAligns) {
     if (seg.equals(entry.segmentName) && sect.equals(entry.sectionName)) {
       align2 = entry.align2;