Rather than just print the GUID, when it is available in the index,
print the global name as well in the function import thin link debug
messages. Names will be available when the combined index is being
built by the same process, e.g. a linker or "llvm-lto2 run".
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 19734 Build 19734: arc lint + arc unit
Event Timeline
Comment Actions
Updated description to clarify that this is for thin link debug messages, and the names are also available when being done via the linker. Only thin links invoked by e.g. llvm-lto on a serialized combined index will not have the names.
Comment Actions
Perhaps define a little helper function:
#ifndef NDEBUG
raw_ostream& operator << (raw_ostream&, ValueInfo&VI) {
if (!VI.empty()) { .... } return dbgs();
}
#endif
then this call can be embedded inside dbgs() << getGUID(VI) << VI << "\n";
Comment Actions
Good idea. I made it a bit more general, so that it prints both the GUID and Name (when available), which allows it to simplify the LLVM_DEBUG invocation further.