diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-10-11 21:13:48 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-10-11 21:13:48 +0000 |
commit | 3a0be84b2aed8563150cdbd976a98838afa261eb (patch) | |
tree | dc3eefaffbe698a01d29b44cab69fd95da7d0949 | |
parent | 44414cf355ee4a86cf3c59d5e3a600e3ff0f9a4b (diff) |
IRgen/Obj-C: Fix encoding of "long double".
- The mind boggles.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116226 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AST/ASTContext.cpp | 2 | ||||
-rw-r--r-- | test/CodeGenObjC/encode-test.m | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 72d7f600f0..e25429bfb9 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -3701,7 +3701,7 @@ static char ObjCEncodingForPrimitiveKind(const ASTContext *C, QualType T) { case BuiltinType::Int128: return 't'; case BuiltinType::Float: return 'f'; case BuiltinType::Double: return 'd'; - case BuiltinType::LongDouble: return 'd'; + case BuiltinType::LongDouble: return 'D'; } } diff --git a/test/CodeGenObjC/encode-test.m b/test/CodeGenObjC/encode-test.m index 2f0c335cfa..24a90a0b4b 100644 --- a/test/CodeGenObjC/encode-test.m +++ b/test/CodeGenObjC/encode-test.m @@ -138,3 +138,9 @@ const char g6[] = @encode(Base1X); // CHECK: @g7 = constant [27 x i8] c"{Derived1X=b2b3b4b5b5b4b3}\00" const char g7[] = @encode(Derived1X); + +// CHECK: @g8 = constant [7 x i8] c"{s8=D}\00" +struct s8 { + long double x; +}; +const char g8[] = @encode(struct s8); |