[PATCH] Style cleanup in comparebyPosition

Davide Italiano davide at freebsd.org
Tue Feb 3 16:30:04 PST 2015


Hi ruiu,

Discussed on llvm-commits

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7394

Files:
  lib/Core/DefinedAtom.cpp

Index: lib/Core/DefinedAtom.cpp
===================================================================
--- lib/Core/DefinedAtom.cpp
+++ lib/Core/DefinedAtom.cpp
@@ -83,14 +83,12 @@

 bool DefinedAtom::compareByPosition(const DefinedAtom *lhs,
                                     const DefinedAtom *rhs) {
-  const File *lhsFile;
-  const File *rhsFile;

   if (lhs == rhs)
     return false;

-  lhsFile = &lhs->file();
-  rhsFile = &rhs->file();
+  const File *lhsFile = &lhs->file();
+  const File *rhsFile = &rhs->file();

   if (lhsFile->ordinal() != rhsFile->ordinal())
     return lhsFile->ordinal() < rhsFile->ordinal();

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7394.19287.patch
Type: text/x-patch
Size: 626 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150204/b90c1e5b/attachment.bin>


More information about the llvm-commits mailing list