mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin/main' into rebranch
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#define SWIFT_BASIC_PATHREMAPPER_H
|
||||
|
||||
#include "swift/Basic/LLVM.h"
|
||||
#include "clang/Basic/PathRemapper.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
|
||||
@@ -57,6 +58,15 @@ public:
|
||||
Path.substr(Mapping.first.size())).str();
|
||||
return Path.str();
|
||||
}
|
||||
|
||||
/// Returns the Clang PathRemapper equivalent, suitable for use with Clang
|
||||
/// APIs.
|
||||
clang::PathRemapper asClangPathRemapper() const {
|
||||
clang::PathRemapper Remapper;
|
||||
for (const auto &Mapping : PathMappings)
|
||||
Remapper.addMapping(Mapping.first, Mapping.second);
|
||||
return Remapper;
|
||||
}
|
||||
};
|
||||
|
||||
class PathObfuscator {
|
||||
|
||||
Reference in New Issue
Block a user