Skip to content

Lift some lli verification checks #90

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

Merged
merged 1 commit into from
May 22, 2017

Conversation

CodaFi
Copy link
Member

@CodaFi CodaFi commented May 18, 2017

Some temporary fixes for lli being stricter than the LLVM verifier.

  • Disallow formation of pointers to void

@@ -24,6 +24,12 @@ public struct PointerType: IRType {
/// - parameter addressSpace: The optional address space where the pointed-to
/// object resides.
public init(pointee: IRType, addressSpace: Int = 0) {
// FIXME: This class of invalid reference is not caught by Module.verify(),
// only `lli`.
if LLVMGetTypeKind(pointee.asLLVM()) == LLVMVoidTypeKind {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pointee is VoidType, no? LLVMTypeRef doesn't conform to IRType and it's guaranteed that an IRType with kind LLVMVoidTypeKind is going to be VoidType

@CodaFi CodaFi force-pushed the low-level-verified-module branch from 7d7fea1 to 9320fd9 Compare May 19, 2017 08:49
@CodaFi CodaFi changed the title [WIP] Lift some lli verification checks Lift some lli verification checks May 22, 2017
@CodaFi
Copy link
Member Author

CodaFi commented May 22, 2017

⛵️

@CodaFi CodaFi merged commit 0cf822c into llvm-swift:master May 22, 2017
@CodaFi CodaFi deleted the low-level-verified-module branch May 22, 2017 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants