[PATCH] Add methods to get archive file name from member file
Shankar Kalpathi Easwaran
shankarke at gmail.com
Thu Feb 5 14:33:36 PST 2015
Comment at: include/lld/Core/File.h:65
@@ -62,1 +64,3 @@
+ return *new (_allocator) std::string(
+ (_archivePath + "(" + _path + ")").str());
> shankarke wrote:
> > Could we cache this path.
> We could, but the cache needs to be invalidated when _archivePath is updated. This is used only for logging and debugging, I think we don't need to do that.
I dont think we ever update the archivePath after setting it.
Comment at: lib/ReaderWriter/FileArchive.cpp:206
@@ -205,3 +205,3 @@
result = std::move(files);
if (std::error_code ec = result->parse())
There is still an issue that if there was a parse error, diagnostics will not show the proper error. Say the file was of a different architecture. I remember this was the reason I created ArchiveMemoryBuffer.
More information about the llvm-commits