Skip to content

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

Closed
wants to merge 4 commits into from
Closed

Correction of assert in case a 32bits architecture is used #6838

wants to merge 4 commits into from

Conversation

jmgc
Copy link
Contributor

@jmgc jmgc commented Jan 16, 2017

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.

jmgc and others added 4 commits January 12, 2017 15:55
@@ -133,8 +133,14 @@ class EffectiveClangContext {
return StringRef(Unresolved.Data, UnresolvedLength);
}
};

#if __SIZEOF_POINTER__ == 4
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this defined on MS platforms? @hughbe @compnerd

Copy link
Contributor

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

@CodaFi
Copy link
Contributor

CodaFi commented Jan 16, 2017

Could you please rebase and drop these merge commits?

@@ -133,8 +133,14 @@ class EffectiveClangContext {
return StringRef(Unresolved.Data, UnresolvedLength);
}
};

#if __SIZEOF_POINTER__ == 4
Copy link
Contributor

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

@jmgc
Copy link
Contributor Author

jmgc commented Jan 16, 2017

Ok, I close this pull request and ask for a new one with a rebased version and using SIZEOF_POINTER.

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.

3 participants