aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/RewriteObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-01-07 18:31:42 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-01-07 18:31:42 +0000
commitc98cbb4a4acb48b09694108761af3c8ba8f7caf2 (patch)
tree22808d7eaccc1f964b82a2c10959d1277caf2648 /lib/Frontend/RewriteObjC.cpp
parent84ed600154d48d75f204795410aae808d7e4b7bd (diff)
Avoid error when convering a pointer to integer in
rewriting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/RewriteObjC.cpp')
-rw-r--r--lib/Frontend/RewriteObjC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp
index 44fa263cff..13de937141 100644
--- a/lib/Frontend/RewriteObjC.cpp
+++ b/lib/Frontend/RewriteObjC.cpp
@@ -3624,7 +3624,7 @@ void RewriteObjC::SynthesizeMetaDataIntoBuffer(std::string &Result) {
int CatDefCount = CategoryImplementation.size();
// This is needed for determining instance variable offsets.
- Result += "\n#define __OFFSETOFIVAR__(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)\n";
+ Result += "\n#define __OFFSETOFIVAR__(TYPE, MEMBER) ((long) &((TYPE *)0)->MEMBER)\n";
// For each implemented class, write out all its meta data.
for (int i = 0; i < ClsDefCount; i++)
RewriteObjCClassMetaData(ClassImplementation[i], Result);