[llvm] r341825 - [LLD][COFF] Cleanup error messages / add more coverage tests

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 10 06:51:21 PDT 2018


Author: aganea
Date: Mon Sep 10 06:51:21 2018
New Revision: 341825

URL: http://llvm.org/viewvc/llvm-project?rev=341825&view=rev
Log:
[LLD][COFF] Cleanup error messages / add more coverage tests

- Log the reason for a PDB or precompiled-OBJ load failure
- Properly handle out-of-date PDB or precompiled-OBJ signature by displaying a corresponding error
- Slightly change behavior on PDB failure: any subsequent load attempt from another OBJ would result in the same error message being logged
- Slightly change behavior on PDB failure: retry with filename only if previous error was ENOENT ("no such file or directory")
- Tests: a. for native PDB errors; b. cover all the cases above

Differential Revision: https://reviews.llvm.org/D51559

Modified:
    llvm/trunk/lib/DebugInfo/PDB/GenericError.cpp

Modified: llvm/trunk/lib/DebugInfo/PDB/GenericError.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/GenericError.cpp?rev=341825&r1=341824&r2=341825&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/GenericError.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/GenericError.cpp Mon Sep 10 06:51:21 2018
@@ -35,7 +35,7 @@ public:
     case pdb_error_code::invalid_utf8_path:
       return "The PDB file path is an invalid UTF8 sequence.";
     case pdb_error_code::signature_out_of_date:
-      return "The signature does not match; the file(s) might be out of date";
+      return "The signature does not match; the file(s) might be out of date.";
     }
     llvm_unreachable("Unrecognized generic_error_code");
   }




More information about the llvm-commits mailing list