[lld] r282763 - Rename warning -> warn.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 29 14:00:24 PDT 2016


Author: ruiu
Date: Thu Sep 29 16:00:23 2016
New Revision: 282763

URL: http://llvm.org/viewvc/llvm-project?rev=282763&view=rev
Log:
Rename warning -> warn.

It's better because it's a verb.

Modified:
    lld/trunk/ELF/Driver.cpp
    lld/trunk/ELF/Error.cpp
    lld/trunk/ELF/Error.h
    lld/trunk/ELF/InputFiles.cpp
    lld/trunk/ELF/LTO.cpp
    lld/trunk/ELF/Mips.cpp
    lld/trunk/ELF/Relocations.cpp
    lld/trunk/ELF/SymbolTable.cpp
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=282763&r1=282762&r2=282763&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Thu Sep 29 16:00:23 2016
@@ -655,7 +655,7 @@ template <class ELFT> void LinkerDriver:
     if (S.getAsInteger(0, Config->ImageBase))
       error(Arg->getSpelling() + ": number expected, but got " + S);
     else if ((Config->ImageBase % Target->MaxPageSize) != 0)
-      warning(Arg->getSpelling() + ": address isn't multiple of page size");
+      warn(Arg->getSpelling() + ": address isn't multiple of page size");
   } else {
     Config->ImageBase = Config->Pic ? 0 : Target->DefaultImageBase;
   }
@@ -689,7 +689,7 @@ template <class ELFT> void LinkerDriver:
     if (Symtab.find(Config->Entry))
       Config->EntrySym = Symtab.addUndefined(Config->Entry);
     else
-      warning("entry symbol " + Config->Entry + " not found, assuming 0");
+      warn("entry symbol " + Config->Entry + " not found, assuming 0");
   }
 
   if (HasError)

Modified: lld/trunk/ELF/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Error.cpp?rev=282763&r1=282762&r2=282763&view=diff
==============================================================================
--- lld/trunk/ELF/Error.cpp (original)
+++ lld/trunk/ELF/Error.cpp Thu Sep 29 16:00:23 2016
@@ -26,7 +26,7 @@ void elf::log(const Twine &Msg) {
     outs() << Msg << "\n";
 }
 
-void elf::warning(const Twine &Msg) {
+void elf::warn(const Twine &Msg) {
   if (Config->FatalWarnings)
     error(Msg);
   else

Modified: lld/trunk/ELF/Error.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Error.h?rev=282763&r1=282762&r2=282763&view=diff
==============================================================================
--- lld/trunk/ELF/Error.h (original)
+++ lld/trunk/ELF/Error.h Thu Sep 29 16:00:23 2016
@@ -35,7 +35,7 @@ extern bool HasError;
 extern llvm::raw_ostream *ErrorOS;
 
 void log(const Twine &Msg);
-void warning(const Twine &Msg);
+void warn(const Twine &Msg);
 
 void error(const Twine &Msg);
 void error(std::error_code EC, const Twine &Prefix);

Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=282763&r1=282762&r2=282763&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Thu Sep 29 16:00:23 2016
@@ -433,10 +433,10 @@ template <class ELFT> void ArchiveFile::
   }
 
   if (IsEmpty)
-    warning(getName() + " has no symbol. Chances are you are doing "
-            "an LTO build and forgot to use an ar command that can create "
-            "a symbol table for LLVM bitcode files. If so, use llvm-ar or "
-            "GNU ar + plugin.");
+    warn(getName() + " has no symbol. Chances are you are doing "
+         "an LTO build and forgot to use an ar command that can create "
+         "a symbol table for LLVM bitcode files. If so, use llvm-ar or "
+         "GNU ar + plugin.");
 }
 
 // Returns a buffer pointing to a member file containing a given symbol.

Modified: lld/trunk/ELF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.cpp?rev=282763&r1=282762&r2=282763&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.cpp (original)
+++ lld/trunk/ELF/LTO.cpp Thu Sep 29 16:00:23 2016
@@ -37,7 +37,7 @@ static void diagnosticHandler(const Diag
   raw_svector_ostream OS(ErrStorage);
   DiagnosticPrinterRawOStream DP(OS);
   DI.print(DP);
-  warning(ErrStorage);
+  warn(ErrStorage);
 }
 
 static std::unique_ptr<lto::LTO> createLTO() {

Modified: lld/trunk/ELF/Mips.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Mips.cpp?rev=282763&r1=282762&r2=282763&view=diff
==============================================================================
--- lld/trunk/ELF/Mips.cpp (original)
+++ lld/trunk/ELF/Mips.cpp Thu Sep 29 16:00:23 2016
@@ -102,9 +102,9 @@ static uint32_t getPicFlags(ArrayRef<Fil
   for (const FileFlags &F : Files.slice(1)) {
     bool IsPic2 = F.Flags & (EF_MIPS_PIC | EF_MIPS_CPIC);
     if (IsPic && !IsPic2)
-      warning("linking abicalls code with non-abicalls file: " + F.Filename);
+      warn("linking abicalls code with non-abicalls file: " + F.Filename);
     if (!IsPic && IsPic2)
-      warning("linking non-abicalls code with abicalls file: " + F.Filename);
+      warn("linking non-abicalls code with abicalls file: " + F.Filename);
   }
 
   // Compute the result PIC/non-PIC flag.

Modified: lld/trunk/ELF/Relocations.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.cpp?rev=282763&r1=282762&r2=282763&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.cpp (original)
+++ lld/trunk/ELF/Relocations.cpp Thu Sep 29 16:00:23 2016
@@ -269,7 +269,7 @@ static int32_t findMipsPairedAddend(cons
     return ((read32<E>(BufLoc) & 0xffff) << 16) +
            readSignedLo16<E>(Buf + RI->r_offset);
   }
-  warning("can't find matching " + getRelName(Type) + " relocation for " +
+  warn("can't find matching " + getRelName(Type) + " relocation for " +
           getRelName(Rel->getType(Config->Mips64EL)));
   return 0;
 }

Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=282763&r1=282762&r2=282763&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Thu Sep 29 16:00:23 2016
@@ -328,7 +328,7 @@ static int compareDefinedNonCommon(Symbo
   if (isa<DefinedCommon>(S->body())) {
     // Non-common symbols take precedence over common symbols.
     if (Config->WarnCommon)
-      warning("common " + S->body()->getName() + " is overridden");
+      warn("common " + S->body()->getName() + " is overridden");
     return 1;
   }
   return 0;
@@ -352,12 +352,12 @@ Symbol *SymbolTable<ELFT>::addCommon(Str
     if (!C) {
       // Non-common symbols take precedence over common symbols.
       if (Config->WarnCommon)
-        warning("common " + S->body()->getName() + " is overridden");
+        warn("common " + S->body()->getName() + " is overridden");
       return S;
     }
 
     if (Config->WarnCommon)
-      warning("multiple common of " + S->body()->getName());
+      warn("multiple common of " + S->body()->getName());
 
     Alignment = C->Alignment = std::max(C->Alignment, Alignment);
     if (Size > C->Size)
@@ -371,7 +371,7 @@ void SymbolTable<ELFT>::reportDuplicate(
                                         InputFile *NewFile) {
   std::string Msg = "duplicate symbol: " + conflictMsg(Existing, NewFile);
   if (Config->AllowMultipleDefinition)
-    warning(Msg);
+    warn(Msg);
   else
     error(Msg);
 }
@@ -576,7 +576,7 @@ static void setVersionId(SymbolBody *Bod
 
   Symbol *Sym = Body->symbol();
   if (Sym->VersionId != Config->DefaultSymbolVersion)
-    warning("duplicate symbol " + Name + " in version script");
+    warn("duplicate symbol " + Name + " in version script");
   Sym->VersionId = Version;
 }
 

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=282763&r1=282762&r2=282763&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu Sep 29 16:00:23 2016
@@ -320,7 +320,7 @@ template <class ELFT> static void report
   if (Sym->File)
     Msg += " in " + getFilename(Sym->File);
   if (Config->UnresolvedSymbols == UnresolvedPolicy::Warn)
-    warning(Msg);
+    warn(Msg);
   else
     error(Msg);
 }




More information about the llvm-commits mailing list