#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/Path.h"
+#include "llvm/Support/TimeValue.h"
#include "llvm/Support/YAMLTraits.h"
#include <vector>
/// This function adds an DebugMapObject to the list owned by this
/// debug map.
- DebugMapObject &addDebugMapObject(StringRef ObjectFilePath);
+ DebugMapObject &addDebugMapObject(StringRef ObjectFilePath,
+ sys::TimeValue Timestamp);
const Triple &getTriple() const { return BinaryTriple; }
#endif
/// Read a debug map for \a InputFile.
- static ErrorOr<std::unique_ptr<DebugMap>>
+ static ErrorOr<std::vector<std::unique_ptr<DebugMap>>>
parseYAMLDebugMap(StringRef InputFile, StringRef PrependPath, bool Verbose);
};
llvm::StringRef getObjectFilename() const { return Filename; }
+ sys::TimeValue getTimestamp() const { return Timestamp; }
+
iterator_range<StringMap<SymbolMapping>::const_iterator> symbols() const {
return make_range(Symbols.begin(), Symbols.end());
}
private:
friend class DebugMap;
/// DebugMapObjects can only be constructed by the owning DebugMap.
- DebugMapObject(StringRef ObjectFilename);
+ DebugMapObject(StringRef ObjectFilename, sys::TimeValue Timestamp);
std::string Filename;
+ sys::TimeValue Timestamp;
StringMap<SymbolMapping> Symbols;
DenseMap<uint64_t, DebugMapEntry *> AddressToMapping;
friend yaml::SequenceTraits<std::vector<std::unique_ptr<DebugMapObject>>>;
friend yaml::SequenceTraits<std::vector<YAMLSymbolMapping>>;
DebugMapObject() = default;
- public:
+
+public:
DebugMapObject &operator=(DebugMapObject RHS) {
std::swap(Filename, RHS.Filename);
+ std::swap(Timestamp, RHS.Timestamp);
std::swap(Symbols, RHS.Symbols);
std::swap(AddressToMapping, RHS.AddressToMapping);
return *this;
}
DebugMapObject(DebugMapObject &&RHS) {
Filename = std::move(RHS.Filename);
+ Timestamp = std::move(RHS.Timestamp);
Symbols = std::move(RHS.Symbols);
AddressToMapping = std::move(RHS.AddressToMapping);
}