[lld] r229453 - [Mips] Replace a magic number by enumeration

Simon Atanasyan simon at atanasyan.com
Mon Feb 16 15:08:20 PST 2015


Author: atanasyan
Date: Mon Feb 16 17:08:20 2015
New Revision: 229453

URL: http://llvm.org/viewvc/llvm-project?rev=229453&view=rev
Log:
[Mips] Replace a magic number by enumeration

No functional changes.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h

Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h?rev=229453&r1=229452&r2=229453&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h Mon Feb 16 17:08:20 2015
@@ -178,7 +178,7 @@ private:
               StringRef("Invalid size of MIPS_OPTIONS section"));
 
         const auto *opt = reinterpret_cast<const Elf_Mips_Options *>(raw.data());
-        if (opt->kind == 1/*ODK_REGINFO*/) {
+        if (opt->kind == ODK_REGINFO) {
           _gp0 = reinterpret_cast<const Elf_RegInfo *>(opt + 1)->ri_gp_value;
           break;
         }





More information about the llvm-commits mailing list