-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Correction of assert in case a 32bits architecture is used #6838
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
Conversation
Update to swift
Updating to the latest version
Updating to the latest version of swift
@@ -133,8 +133,14 @@ class EffectiveClangContext { | |||
return StringRef(Unresolved.Data, UnresolvedLength); | |||
} | |||
}; | |||
|
|||
#if __SIZEOF_POINTER__ == 4 |
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.
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.
Nope. SIZEOF_POINTER is undefined
Use LLVM_PTR_SIZE defined in "LLVM/Support/Compiler.h"
https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Support/Compiler.h
Could you please rebase and drop these merge commits? |
@@ -133,8 +133,14 @@ class EffectiveClangContext { | |||
return StringRef(Unresolved.Data, UnresolvedLength); | |||
} | |||
}; | |||
|
|||
#if __SIZEOF_POINTER__ == 4 |
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.
Nope. SIZEOF_POINTER is undefined
Use LLVM_PTR_SIZE defined in "LLVM/Support/Compiler.h"
https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Support/Compiler.h
Ok, I close this pull request and ask for a new one with a rebased version and using SIZEOF_POINTER. |
There is an assert that checks the size of a type against the pointer size. This does not work on 32 bits architectures as the pointers are smaller, but the other types are not reduced acordingly.