forked from OSchip/llvm-project
Rename warning -> warn.
It's better because it's a verb. llvm-svn: 282763
This commit is contained in:
parent
2abd0c2154
commit
d31e13f287
|
@ -655,7 +655,7 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) {
|
|||
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::link(opt::InputArgList &Args) {
|
|||
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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -433,10 +433,10 @@ template <class ELFT> void ArchiveFile::parse() {
|
|||
}
|
||||
|
||||
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.
|
||||
|
|
|
@ -37,7 +37,7 @@ static void diagnosticHandler(const DiagnosticInfo &DI) {
|
|||
raw_svector_ostream OS(ErrStorage);
|
||||
DiagnosticPrinterRawOStream DP(OS);
|
||||
DI.print(DP);
|
||||
warning(ErrStorage);
|
||||
warn(ErrStorage);
|
||||
}
|
||||
|
||||
static std::unique_ptr<lto::LTO> createLTO() {
|
||||
|
|
|
@ -102,9 +102,9 @@ static uint32_t getPicFlags(ArrayRef<FileFlags> Files) {
|
|||
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.
|
||||
|
|
|
@ -269,7 +269,7 @@ static int32_t findMipsPairedAddend(const uint8_t *Buf, const uint8_t *BufLoc,
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -328,7 +328,7 @@ static int compareDefinedNonCommon(Symbol *S, bool WasInserted,
|
|||
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(StringRef N, uint64_t Size,
|
|||
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(SymbolBody *Existing,
|
|||
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 *Body, StringRef VersionName,
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ template <class ELFT> static void reportUndefined(SymbolBody *Sym) {
|
|||
if (Sym->File)
|
||||
Msg += " in " + getFilename(Sym->File);
|
||||
if (Config->UnresolvedSymbols == UnresolvedPolicy::Warn)
|
||||
warning(Msg);
|
||||
warn(Msg);
|
||||
else
|
||||
error(Msg);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue