aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2010-12-26 20:12:30 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2010-12-26 20:12:30 +0000
commitc7ff82c2040f45eaad2eddea0e4461dddc972cd1 (patch)
tree310e54b9178d50b374f5dd10f39a2a7932355f54 /lib
parent3f59c975aa5d047f7edd1b900b5e885c38af0ef7 (diff)
Fix for PR8695.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122564 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/ASTContext.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index eb6a821783..b1fd16fb07 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -3785,7 +3785,10 @@ static void EncodeBitField(const ASTContext *Context, std::string& S,
break;
}
S += llvm::utostr(RL.getFieldOffset(i));
- S += ObjCEncodingForPrimitiveKind(Context, T);
+ if (T->isEnumeralType())
+ S += 'i';
+ else
+ S += ObjCEncodingForPrimitiveKind(Context, T);
}
unsigned N = E->EvaluateAsInt(*Ctx).getZExtValue();
S += llvm::utostr(N);