[lld] r278473 - Add comments.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 21:28:20 PDT 2016


Author: ruiu
Date: Thu Aug 11 23:28:20 2016
New Revision: 278473

URL: http://llvm.org/viewvc/llvm-project?rev=278473&view=rev
Log:
Add comments.

Modified:
    lld/trunk/ELF/Mips.cpp

Modified: lld/trunk/ELF/Mips.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Mips.cpp?rev=278473&r1=278472&r2=278473&view=diff
==============================================================================
--- lld/trunk/ELF/Mips.cpp (original)
+++ lld/trunk/ELF/Mips.cpp Thu Aug 11 23:28:20 2016
@@ -252,6 +252,12 @@ static StringRef getArchName(uint32_t Fl
   }
 }
 
+// There are (arguably too) many MIPS ISAs out there. Some are compatible
+// with each other and some are not. This function checks if all input
+// files are compatible with each other, and if so, returns the "lowest"
+// ISA flag. For example, if one object is in EF_MIPS_ARCH_3 and the
+// other is in EF_MIPS_ARCH_2, it'll return EF_MIPS_ARCH_2 because it's
+// older than EF_MIPS_ARCH_3.
 static uint32_t getArchFlags(ArrayRef<FileFlags> Files) {
   uint32_t Ret = Files[0].Flags & (EF_MIPS_ARCH | EF_MIPS_MACH);
 




More information about the llvm-commits mailing list