From: Fariborz Jahanian Date: Tue, 1 Apr 2014 19:32:35 +0000 (+0000) Subject: Objective-C modern translator. Fix declaration of X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae76507458f81f8576a7b4c69f5e2c4241ee6702;p=clang 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 --- 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";