summaryrefslogtreecommitdiff
path: root/tools/dsymutil/DebugMap.h
diff options
context:
space:
mode:
authorFrederic Riss <friss@apple.com>2015-06-05 16:35:44 +0000
committerFrederic Riss <friss@apple.com>2015-06-05 16:35:44 +0000
commit8a5883aabe430a0fbc9abdd0b90f119d390fa28f (patch)
tree165413ddf8fc8564ff11080521f8f66fa8f0b0f4 /tools/dsymutil/DebugMap.h
parentb6ebf678ac7121e2d75f6bfb90f668804009ab99 (diff)
[dsymutil] Handle the -oso-prepend-path option when the input is a YAML debug map
All the tests using a YAML debug map will need this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239163 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/dsymutil/DebugMap.h')
-rw-r--r--tools/dsymutil/DebugMap.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/dsymutil/DebugMap.h b/tools/dsymutil/DebugMap.h
index 08bba18602c..a5dc56e6549 100644
--- a/tools/dsymutil/DebugMap.h
+++ b/tools/dsymutil/DebugMap.h
@@ -28,6 +28,7 @@
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/Format.h"
+#include "llvm/Support/Path.h"
#include "llvm/Support/YAMLTraits.h"
#include <vector>
@@ -208,8 +209,12 @@ template <> struct MappingTraits<dsymutil::DebugMapObject> {
Entries.push_back(std::make_pair(Entry.getKey(), Entry.getValue()));
}
- dsymutil::DebugMapObject denormalize(IO &) {
- dsymutil::DebugMapObject Res(Filename);
+ dsymutil::DebugMapObject denormalize(IO &IO) {
+ void *Ctxt = IO.getContext();
+ StringRef PrependPath = *reinterpret_cast<StringRef*>(Ctxt);
+ SmallString<80> Path(PrependPath);
+ sys::path::append(Path, Filename);
+ dsymutil::DebugMapObject Res(Path);
for (auto &Entry : Entries) {
auto &Mapping = Entry.second;
Res.addSymbol(Entry.first, Mapping.ObjectAddress, Mapping.BinaryAddress,