mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Update clang TargetInfo AddressSpace API usage
The TargetInfo pointer APIs updated to taking an "AddressSpace" type instead of a raw integer. This goes through and updates the call locations where this change caused build failures. In all cases, the value passed was `0`, corresponding with the Default AddressSpace.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "swift/AST/Type.h"
|
||||
#include "swift/IRGen/IRABIDetailsProvider.h"
|
||||
#include "swift/IRGen/Linking.h"
|
||||
#include "clang/Basic/AddressSpaces.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
|
||||
@@ -178,7 +179,7 @@ void printPrimitiveGenericTypeTraits(raw_ostream &os, ASTContext &astContext,
|
||||
auto &clangTI =
|
||||
astContext.getClangModuleLoader()->getClangASTContext().getTargetInfo();
|
||||
bool isSwiftIntLong =
|
||||
clangTI.getPtrDiffType(0) == clang::TransferrableTargetInfo::SignedLong;
|
||||
clangTI.getPtrDiffType(clang::LangAS::Default) == clang::TransferrableTargetInfo::SignedLong;
|
||||
bool isInt64Long =
|
||||
clangTI.getInt64Type() == clang::TransferrableTargetInfo::SignedLong;
|
||||
if (!(isSwiftIntLong && !isInt64Long))
|
||||
|
||||
Reference in New Issue
Block a user