[lld] 485f3f3 - [ELF] Make two PPC64.cpp variables constexpr. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 14:31:19 PDT 2020


Author: Fangrui Song
Date: 2020-09-10T14:31:10-07:00
New Revision: 485f3f35cc511637661619967319eafb932df5d5

URL: https://github.com/llvm/llvm-project/commit/485f3f35cc511637661619967319eafb932df5d5
DIFF: https://github.com/llvm/llvm-project/commit/485f3f35cc511637661619967319eafb932df5d5.diff

LOG: [ELF] Make two PPC64.cpp variables constexpr. NFC

Why are they mutable? :)

Added: 
    

Modified: 
    lld/ELF/Arch/PPC64.cpp

Removed: 
    


################################################################################
diff  --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp
index cfb3ca9df406..f5c91c1ff3b5 100644
--- a/lld/ELF/Arch/PPC64.cpp
+++ b/lld/ELF/Arch/PPC64.cpp
@@ -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.


        


More information about the llvm-commits mailing list