mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #85560 from slavapestov/fix-ridiculous-irgen-thing
IRGen: Remove unsafe usage of static variable
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user