Issue 170491
Summary Detailed preprocessing records break modules
Labels new issue
Assignees
Reporter rolfbjarne
    Repro:
 
Download and extract [LLVM-21.1.6-macOS-ARM64.tar.xz](https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.6/LLVM-21.1.6-macOS-ARM64.tar.xz) (leave the extracted contents in ~/Downloads)

Execute:

```shell
$ echo '@import Foundation; void not_available() NS_UNAVAILABLE;' | /Users/rolf/Downloads/LLVM-21.1.6-macOS-ARM64/bin/clang -x objective-c -c -Xclang -detailed-preprocessing-record -fmodules -fmodules-cache-path=$TMPDIR/clang/tmpcache -isysroot $(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -
fatal error: malformed or corrupted precompiled file: 'malformed block record in AST file'
note: after modifying system headers, please delete the module cache at '/var/folders/43/c7b5_0ts4yb2ddjvrb6d20b40000gn/T/clang/tmpcache/2660OB5VQO3AR'
1 error generated.
```

Removing `-Xclang -detailed-preprocessing-record` from the command line makes it work.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to