File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -325,9 +325,12 @@ static void writeImports(raw_ostream &out,
325
325
const clang::Module *module ) {
326
326
auto startIdx = allPaths.size ();
327
327
if (module ->IsFramework ) {
328
+ SmallString<64 > Buffer (header.NameAsWritten );
329
+ llvm::sys::path::replace_path_prefix (Buffer, " Headers/" , StringRef ());
330
+ llvm::sys::path::replace_path_prefix (Buffer, " PrivateHeaders/" , StringRef ());
328
331
// For framworks, the header import should start from the framework name.
329
332
allPaths.append (module ->getTopLevelModuleName ());
330
- llvm::sys::path::append (allPaths, header. NameAsWritten );
333
+ llvm::sys::path::append (allPaths, Buffer. str () );
331
334
} else {
332
335
// Otherwise, import the header directly.
333
336
allPaths.append (header.NameAsWritten );
You can’t perform that action at this time.
0 commit comments