projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix build breakage from last commit (window-nat.c:windows_create_inferior)
[deliverable/binutils-gdb.git]
/
gold
/
errors.h
diff --git
a/gold/errors.h
b/gold/errors.h
index 17b72e10b368b5da6619bb5c19b8ba38e7ba8a13..f0a50b65c2c76defa79e66151d2b299c6977f684 100644
(file)
--- a/
gold/errors.h
+++ b/
gold/errors.h
@@
-1,6
+1,6
@@
// errors.h -- handle errors for gold -*- C++ -*-
// errors.h -- handle errors for gold -*- C++ -*-
-// Copyright
2006, 200
7 Free Software Foundation, Inc.
+// Copyright
(C) 2006-201
7 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@
-49,6
+49,12
@@
class Errors
void
fatal(const char* format, va_list) ATTRIBUTE_NORETURN;
void
fatal(const char* format, va_list) ATTRIBUTE_NORETURN;
+ // Report a fallback error. After printing the error, this must exit
+ // with a special status code indicating that fallback to
+ // --incremental-full is required.
+ void
+ fallback(const char* format, va_list) ATTRIBUTE_NORETURN;
+
// Report an error and continue.
void
error(const char* format, va_list);
// Report an error and continue.
void
error(const char* format, va_list);
@@
-57,6
+63,10
@@
class Errors
void
warning(const char* format, va_list);
void
warning(const char* format, va_list);
+ // Print an informational message and continue.
+ void
+ info(const char* format, va_list);
+
// Report an error at a reloc location.
template<int size, bool big_endian>
void
// Report an error at a reloc location.
template<int size, bool big_endian>
void
@@
-71,14
+81,10
@@
class Errors
size_t relnum, off_t reloffset,
const char* format, va_list);
size_t relnum, off_t reloffset,
const char* format, va_list);
- // Issue an undefined symbol error. SYM is the undefined symbol.
- // RELINFO is the general relocation info. RELNUM is the number of
- // the reloc, and RELOFFSET is the reloc's offset.
- template<int size, bool big_endian>
+ // Issue an undefined symbol error. LOCATION is the location of
+ // the error (typically an object file name or relocation info).
void
void
- undefined_symbol(const Symbol* sym,
- const Relocate_info<size, big_endian>* relinfo,
- size_t relnum, off_t reloffset);
+ undefined_symbol(const Symbol* sym, const std::string& location);
// Report a debugging message.
void
// Report a debugging message.
void
@@
-89,16
+95,25
@@
class Errors
error_count() const
{ return this->error_count_; }
error_count() const
{ return this->error_count_; }
+ // Return the number of warnings.
+ int
+ warning_count() const
+ { return this->warning_count_; }
+
private:
Errors(const Errors&);
Errors& operator=(const Errors&);
// Initialize the lock. We don't do this in the constructor because
// lock initialization wants to know whether we are using threads or
private:
Errors(const Errors&);
Errors& operator=(const Errors&);
// Initialize the lock. We don't do this in the constructor because
// lock initialization wants to know whether we are using threads or
- // not.
- void
+ // not.
This returns true if the lock is now initialized.
+ bool
initialize_lock();
initialize_lock();
+ // Increment a counter, holding the lock.
+ void
+ increment_counter(int*);
+
// The number of times we report an undefined symbol.
static const int max_undefined_error_report = 5;
// The number of times we report an undefined symbol.
static const int max_undefined_error_report = 5;
@@
-107,6
+122,8
@@
class Errors
// This class can be accessed from multiple threads. This lock is
// used to control access to the data structures.
Lock* lock_;
// This class can be accessed from multiple threads. This lock is
// used to control access to the data structures.
Lock* lock_;
+ // Used to initialize the lock_ field exactly once.
+ Initialize_lock initialize_lock_;
// Numbers of errors reported.
int error_count_;
// Number of warnings reported.
// Numbers of errors reported.
int error_count_;
// Number of warnings reported.
This page took
0.023746 seconds
and
4
git commands to generate.