diff options
author | Kevin Qin <Kevin.Qin@arm.com> | 2014-02-24 02:45:03 +0000 |
---|---|---|
committer | Kevin Qin <Kevin.Qin@arm.com> | 2014-02-24 02:45:03 +0000 |
commit | ad64f6d4e541972ee688fca23eae71b2304e567c (patch) | |
tree | 142c1e4286194d17bbbdc5922b0e5a623cd3c95a /clang/lib/AST/ASTContext.cpp | |
parent | 51bacfd9c7b671da9c6bb0c3f98cb775994cffdd (diff) | |
download | bcm5719-llvm-ad64f6d4e541972ee688fca23eae71b2304e567c.tar.gz bcm5719-llvm-ad64f6d4e541972ee688fca23eae71b2304e567c.zip |
[AArch64] Change int64_t from 'long long int' to 'long int' for AArch64 target.
Most 64-bit targets define int64_t as long int, and AArch64 should
make same definition to follow LP64 model. In GNU tool chain, int64_t
is defined as long int for 64-bit target. So to get consistent with GNU,
it's better Changing int64_t from 'long long int' to 'long int',
otherwise clang will get different name mangling suffix compared with g++.
llvm-svn: 202004
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index a1f2e1f4ab6..f259ea1ceca 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -7526,6 +7526,19 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context, assert(HowLong <= 2 && "Can't have LLLL modifier"); ++HowLong; break; + case 'W': + // This modifier represents int64 type. + assert(HowLong == 0 && "Can't use both 'L' and 'W' modifiers!"); + switch (Context.getTargetInfo().getInt64Type()) { + default: + llvm_unreachable("Unexpected integer type"); + case TargetInfo::SignedLong: + HowLong = 1; + break; + case TargetInfo::SignedLongLong: + HowLong = 2; + break; + } } } |