Merge pull request #85560 from slavapestov/fix-ridiculous-irgen-thing

IRGen: Remove unsafe usage of static variable
This commit is contained in:
Slava Pestov
2025-11-20 02:54:38 -05:00
committed by GitHub
5 changed files with 33 additions and 30 deletions

View File

@@ -1416,13 +1416,13 @@ llvm::Module *IRGenModule::getModule() const {
return ClangCodeGen->GetModule();
}
bool IRGenModule::IsWellKnownBuiltinOrStructralType(CanType T) const {
bool IRGenModule::isWellKnownBuiltinOrStructuralType(CanType T) const {
if (T == Context.TheEmptyTupleType || T == Context.TheNativeObjectType ||
T == Context.TheBridgeObjectType || T == Context.TheRawPointerType ||
T == Context.getAnyObjectType())
return true;
if (auto IntTy = dyn_cast_or_null<BuiltinIntegerType>(T)) {
if (auto IntTy = dyn_cast<BuiltinIntegerType>(T)) {
auto Width = IntTy->getWidth();
if (Width.isPointerWidth())
return true;