[ELF] Make two PPC64.cpp variables constexpr. NFC
authorFangrui Song <i@maskray.me>
Thu, 10 Sep 2020 21:30:00 +0000 (14:30 -0700)
committerFangrui Song <i@maskray.me>
Thu, 10 Sep 2020 21:31:10 +0000 (14:31 -0700)
Why are they mutable? :)

lld/ELF/Arch/PPC64.cpp

index cfb3ca9..f5c91c1 100644 (file)
@@ -22,8 +22,8 @@ using namespace llvm::ELF;
 using namespace lld;
 using namespace lld::elf;
 
-static uint64_t ppc64TocOffset = 0x8000;
-static uint64_t dynamicThreadPointerOffset = 0x8000;
+constexpr uint64_t ppc64TocOffset = 0x8000;
+constexpr uint64_t dynamicThreadPointerOffset = 0x8000;
 
 // The instruction encoding of bits 21-30 from the ISA for the Xform and Dform
 // instructions that can be used as part of the initial exec TLS sequence.