[lld] 456c239 - [ELF] Set ctx.internalFile for PPC64 _savegpr[01]_{14..31} and _restgpr[01]_{14..31}. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 18:21:25 PDT 2024


Author: Fangrui Song
Date: 2024-03-19T18:21:20-07:00
New Revision: 456c239d775e10a68c65cd9d461bb47e651ccbe5

URL: https://github.com/llvm/llvm-project/commit/456c239d775e10a68c65cd9d461bb47e651ccbe5
DIFF: https://github.com/llvm/llvm-project/commit/456c239d775e10a68c65cd9d461bb47e651ccbe5.diff

LOG: [ELF] Set ctx.internalFile for PPC64 _savegpr[01]_{14..31} and _restgpr[01]_{14..31}. NFC

Ensure that every InputFile has a non-null file so that we enforce this
in the future.

Added: 
    

Modified: 
    lld/ELF/Arch/PPC64.cpp

Removed: 
    


################################################################################
diff  --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp
index 657332deebfde1..3188772f7c4904 100644
--- a/lld/ELF/Arch/PPC64.cpp
+++ b/lld/ELF/Arch/PPC64.cpp
@@ -286,7 +286,7 @@ static void writeSequence(MutableArrayRef<uint32_t> buf, const char *prefix,
   // The full section content has the extent of [begin, end). We drop unused
   // instructions and write [first,end).
   auto *sec = make<InputSection>(
-      nullptr, SHF_ALLOC, SHT_PROGBITS, 4,
+      ctx.internalFile, SHF_ALLOC, SHT_PROGBITS, 4,
       ArrayRef(reinterpret_cast<uint8_t *>(buf.data() + first),
                4 * (buf.size() - first)),
       ".text");


        


More information about the llvm-commits mailing list