Issue 239924
Summary [clang][ObjC] `__declspec(dllimport)` on a class that is `@implementation`-ed in the same TU emits a broken module
Labels crash, objective-c, generated by fuzzer
Assignees
Reporter YuanchengJiang
    The following code:
```objc
@interface NSObject
@end
__declspec(dllimport)
@interface I : NSObject
@end
@implementation I
@end
```

Resulted in this output:
```
Stack dump:
 #3 llvm::CrashRecoveryContext::HandleExit
 #5 LLVMErrorHandler
 #6 llvm::report_fatal_error
 #7 
 #8 
 #9 llvm::detail::PassModel::runImpl
#10 llvm::PassManager::run
#11 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline
```

Trunk reproducer (`-x objective-c -emit-llvm --target=i686-windows`): https://godbolt.org/z/5sYvYGTsG
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to