[cfe-commits] r116226 - in /cfe/trunk: lib/AST/ASTContext.cpp test/CodeGenObjC/encode-test.m
Daniel Dunbar
daniel at zuster.org
Mon Oct 11 14:13:49 PDT 2010
Author: ddunbar
Date: Mon Oct 11 16:13:48 2010
New Revision: 116226
URL: http://llvm.org/viewvc/llvm-project?rev=116226&view=rev
Log:
IRgen/Obj-C: Fix encoding of "long double".
- The mind boggles.
Modified:
cfe/trunk/lib/AST/ASTContext.cpp
cfe/trunk/test/CodeGenObjC/encode-test.m
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=116226&r1=116225&r2=116226&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Mon Oct 11 16:13:48 2010
@@ -3701,7 +3701,7 @@
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';
}
}
Modified: cfe/trunk/test/CodeGenObjC/encode-test.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/encode-test.m?rev=116226&r1=116225&r2=116226&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/encode-test.m (original)
+++ cfe/trunk/test/CodeGenObjC/encode-test.m Mon Oct 11 16:13:48 2010
@@ -138,3 +138,9 @@
// 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);
More information about the cfe-commits
mailing list