diff options
author | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2019-03-29 19:58:58 +0000 |
---|---|---|
committer | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2019-03-29 19:58:58 +0000 |
commit | 347a45ccd5fb5cb46e7eb3f0bd4eedc600d1c253 (patch) | |
tree | cb7e752850181b2560db8246d94905e345225805 /lld/COFF/Config.h | |
parent | 233ff94212633f88b868f4ea1cd1887aa957ce41 (diff) | |
download | bcm5719-llvm-347a45ccd5fb5cb46e7eb3f0bd4eedc600d1c253.tar.gz bcm5719-llvm-347a45ccd5fb5cb46e7eb3f0bd4eedc600d1c253.zip |
[LLD][COFF] Improve checkFailIfMismatch()
As suggested by ruiu here (https://reviews.llvm.org/D58910#1425484), defer a call to toString(File) until it's really needed (if there's an error)
Differential Revision: https://reviews.llvm.org/D59411
llvm-svn: 357305
Diffstat (limited to 'lld/COFF/Config.h')
-rw-r--r-- | lld/COFF/Config.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/COFF/Config.h b/lld/COFF/Config.h index 99b3b9eae71..b13ef3a7ece 100644 --- a/lld/COFF/Config.h +++ b/lld/COFF/Config.h @@ -28,6 +28,7 @@ class DefinedAbsolute; class DefinedRelative; class StringChunk; class Symbol; +class InputFile; // Short aliases. static const auto AMD64 = llvm::COFF::IMAGE_FILE_MACHINE_AMD64; @@ -166,7 +167,7 @@ struct Configuration { std::map<std::string, int> AlignComm; // Used for /failifmismatch. - std::map<StringRef, std::pair<StringRef, std::string>> MustMatch; + std::map<StringRef, std::pair<StringRef, InputFile *>> MustMatch; // Used for /alternatename. std::map<StringRef, StringRef> AlternateNames; |