Skip to content

Commit 6a7a7ff

Browse files
committed
Revert "PrintAsObjc: strip Headers and PrivateHeaders component in header paths explicitly"
This reverts commit 411833d.
1 parent ab97d50 commit 6a7a7ff

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/PrintAsObjC/PrintAsObjC.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,9 @@ static void writeImports(raw_ostream &out,
325325
const clang::Module *module) {
326326
auto startIdx = allPaths.size();
327327
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());
331328
// For framworks, the header import should start from the framework name.
332329
allPaths.append(module->getTopLevelModuleName());
333-
llvm::sys::path::append(allPaths, Buffer.str());
330+
llvm::sys::path::append(allPaths, header.NameAsWritten);
334331
} else {
335332
// Otherwise, import the header directly.
336333
allPaths.append(header.NameAsWritten);

0 commit comments

Comments
 (0)