-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Windows [AST], [Serialization] and [IRGen] Fixes #11111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f6c515d
413724f
492bbf4
ff061d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -432,7 +432,8 @@ class ModuleFile : public LazyMemberLoader { | |
|
||
/// Emits one last diagnostic, logs the error, and then aborts for the stack | ||
/// trace. | ||
void fatal(llvm::Error error) LLVM_ATTRIBUTE_NORETURN; | ||
LLVM_ATTRIBUTE_NORETURN | ||
void fatal(llvm::Error error); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wrote this patch too. 👍 |
||
|
||
ASTContext &getContext() const { | ||
assert(FileContext && "no associated context yet"); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -392,7 +392,7 @@ IRGenModule::IRGenModule(IRGenerator &irgen, | |
AtomicBoolAlign = Alignment(ClangASTContext->getTypeSize(atomicBoolTy)); | ||
} | ||
|
||
IsSwiftErrorInRegister = | ||
IsSwiftErrorInRegister = UseSwiftCC && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was the additional There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To summarise my earlier answer: both There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the least disruptive way to fix that particular issue, but the correct solution may be to change one of the problematic functions to match - which to change depends on whether There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That being a workaround is reasonable, though we should at least know where exactly it shows up and how to reproduce it so that we can track fixing it. I think it is worth filing an SR for that issue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So the exact locations are line 163 of
as opposed to line 2204 of
only. The comments before lines 163 and 2204 of I won't have a chance to try a native Windows build for a while and give you the exact error message, but that's the reasoning. |
||
clang::CodeGen::swiftcall::isSwiftErrorLoweredInRegister( | ||
ClangCodeGen->CGM()); | ||
} | ||
|
@@ -453,7 +453,7 @@ llvm::Constant *swift::getRuntimeFn(llvm::Module &Module, | |
fn->setCallingConv(cc); | ||
|
||
if (::useDllStorage(llvm::Triple(Module.getTargetTriple())) && | ||
(fn->getLinkage() == llvm::GlobalValue::ExternalLinkage || | ||
((fn->isDeclaration() && fn->getLinkage() == llvm::GlobalValue::ExternalLinkage) || | ||
fn->getLinkage() == llvm::GlobalValue::AvailableExternallyLinkage)) | ||
fn->setDLLStorageClass(llvm::GlobalValue::DLLImportStorageClass); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The right way to fix this might be to just use
friend LegacyASTTransformer
without theclass
. Or that might not work, in which case this is okay.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That gives 'C++ requires a type specifier for all declarations' and 'friends can only be classes or functions' when compiling using clang-cl and with
-fms-compatibility-version=19
. I think we're stuck with the explicit namespacing, unfortunately.