[ELF] - Report call graph profile file names in error messages.
authorGeorge Rimar <grimar@accesssoftek.com>
Tue, 10 Jul 2018 10:16:48 +0000 (10:16 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Tue, 10 Jul 2018 10:16:48 +0000 (10:16 +0000)
We did not report file names for some reason.

llvm-svn: 336650

lld/ELF/Driver.cpp
lld/test/ELF/cgprofile-warn.s

index 386c63a..645c78f 100644 (file)
@@ -640,9 +640,9 @@ static void readCallGraph(MemoryBufferRef MB) {
     const Symbol *ToSym = SymbolNameToSymbol.lookup(Fields[1]);
     if (Config->WarnSymbolOrdering) {
       if (!FromSym)
-        warn("call graph file: no such symbol: " + Fields[0]);
+        warn(MB.getBufferIdentifier() + ": no such symbol: " + Fields[0]);
       if (!ToSym)
-        warn("call graph file: no such symbol: " + Fields[1]);
+        warn(MB.getBufferIdentifier() + ": no such symbol: " + Fields[1]);
     }
     if (!FromSym || !ToSym || Count == 0)
       continue;
index 471dc18..d6c6462 100644 (file)
@@ -25,5 +25,5 @@ A:
     retq
 
 # CHECK: unable to order absolute symbol: B
-# CHECK: call graph file: no such symbol: adena
+# CHECK: {{.*}}.call_graph: no such symbol: adena
 # CHECK: unable to order undefined symbol: poppy