Enable pdbpagesize to allow support for PDB file sizes > 4GB

Enable the pdbpagesize flag to allow linking of PDB files > 4GB.
Also includes a couple small fixes to change to uint64_t to support the
larger file sizes.  I updated the max file size check in MSFBuilder.cpp
to take into account the page size.

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

GitOrigin-RevId: e4eb6216c2ebeac5203ff9cab8fe96f092d08c0f
diff --git a/COFF/DriverUtils.cpp b/COFF/DriverUtils.cpp
index cac254e..0921c8e 100644
--- a/COFF/DriverUtils.cpp
+++ b/COFF/DriverUtils.cpp
@@ -186,12 +186,6 @@
     return;
   }
 
-  // FIXME: Remove this once other page sizes work.
-  if (v != 4096) {
-    warn("/pdbpagesize: page sizes != 4096 not yet implemented, ignoring flag");
-    v = 4096;
-  }
-
   config->pdbPageSize = v;
 }
 
diff --git a/test/COFF/pdbpagesize.test b/test/COFF/pdbpagesize.test
index 1f9df65..d6efc44 100644
--- a/test/COFF/pdbpagesize.test
+++ b/test/COFF/pdbpagesize.test
@@ -10,6 +10,14 @@
 # RUN: llvm-pdbutil pdb2yaml %t.pdb | FileCheck --check-prefix=PAGE4096 %s
 # PAGE4096: BlockSize: 4096
 
-# RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbpagesize:8192 2>&1 \
-# RUN:     | FileCheck --check-prefix=TODO %s
-# TODO: warning: /pdbpagesize: page sizes != 4096 not yet implemented, ignoring flag
+# RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbpagesize:8192
+# RUN: llvm-pdbutil pdb2yaml %t.pdb | FileCheck --check-prefix=PAGE8192 %s
+# PAGE8192: BlockSize: 8192
+
+# RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbpagesize:16384
+# RUN: llvm-pdbutil pdb2yaml %t.pdb | FileCheck --check-prefix=PAGE16384 %s
+# PAGE16384: BlockSize: 16384
+
+# RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbpagesize:32768
+# RUN: llvm-pdbutil pdb2yaml %t.pdb | FileCheck --check-prefix=PAGE32768 %s
+# PAGE32768: BlockSize: 32768