diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-04-01 19:32:35 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-04-01 19:32:35 +0000 |
commit | ae76507458f81f8576a7b4c69f5e2c4241ee6702 (patch) | |
tree | a3149017887c82c24f4fb1f0d082a006ef97b1ff /lib/Rewrite | |
parent | 5ccd87926cd78d78503ab0a5336b7825b2e8e872 (diff) |
Objective-C modern translator. Fix declaration of
__NSConstantStringImpl's length field to accomodate
window's 64bit LLP64 mode. // rdar://16489050
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205353 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite')
-rw-r--r-- | lib/Rewrite/Frontend/RewriteModernObjC.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Rewrite/Frontend/RewriteModernObjC.cpp b/lib/Rewrite/Frontend/RewriteModernObjC.cpp index febfb9bce7..9066a5fdcb 100644 --- a/lib/Rewrite/Frontend/RewriteModernObjC.cpp +++ b/lib/Rewrite/Frontend/RewriteModernObjC.cpp @@ -6108,7 +6108,11 @@ void RewriteModernObjC::Initialize(ASTContext &context) { Preamble += " int *isa;\n"; Preamble += " int flags;\n"; Preamble += " char *str;\n"; + Preamble += "#if __LLP64__\n"; + Preamble += " long long length;\n"; + Preamble += "#else\n"; Preamble += " long length;\n"; + Preamble += "#endif\n"; Preamble += "};\n"; Preamble += "#ifdef CF_EXPORT_CONSTANT_STRING\n"; Preamble += "extern \"C\" __declspec(dllexport) int __CFConstantStringClassReference[];\n"; |