[clang] [clang] use absolute path for builtin headers during module compilation (PR #68023)
Richard Howell via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 5 12:13:17 PDT 2023
rmaz wrote:
> Wouldn't this always have been the case? I'll check shortly with a resource dir picked up via toolchain bundle layout.
Looks like yes:
```
Process 77520 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x0000000109b568fd clang`clang::ModuleMap::resolveAsBuiltinHeader(this=0x000000011b02ac70, Mod=0x000000011b03d600, Header=0x00007ff7bfefabd0) at ModuleMap.cpp:348:8
345 SmallString<128> Path;
346 llvm::sys::path::append(Path, BuiltinIncludeDir->getName(), Header.FileName);
347 auto File = SourceMgr.getFileManager().getOptionalFileRef(Path);
-> 348 if (!File)
349 return false;
350
351 // Ensure the path to the module directory is absolute, otherwise
Target 0: (clang) stopped.
(lldb) p Path.str()
(llvm::StringRef) (Data = "/Users/rhow/local/github/llvmbuilddbg.noindex/lib/clang/18/include/float.h", Length = 74)
```
https://github.com/llvm/llvm-project/pull/68023
More information about the cfe-commits
mailing list