forked from OSchip/llvm-project
Fix abbreviation for CharacterLiteral in AST serialization. PR13806.
llvm-svn: 163863
This commit is contained in:
parent
aeb85680fb
commit
21530f7c4e
|
@ -1619,7 +1619,7 @@ void ASTWriter::WriteDeclsBlockAbbrevs() {
|
|||
//Character Literal
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // getValue
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Location
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); //IsWide
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2)); // getKind
|
||||
CharacterLiteralAbbrev = Stream.EmitAbbrev(Abv);
|
||||
|
||||
Abv = new BitCodeAbbrev();
|
||||
|
|
|
@ -37,3 +37,9 @@ cxx_null_ptr_result null_ptr = nullptr;
|
|||
// CXXTypeidExpr
|
||||
typeid_result1 typeid_1 = 0;
|
||||
typeid_result2 typeid_2 = 0;
|
||||
|
||||
// CharacterLiteral variants
|
||||
static_assert(char_value == 97, "char_value is correct");
|
||||
static_assert(wchar_t_value == 305, "wchar_t_value is correct");
|
||||
static_assert(char16_t_value == 231, "char16_t_value is correct");
|
||||
static_assert(char32_t_value == 8706, "char32_t_value is correct");
|
||||
|
|
|
@ -81,3 +81,8 @@ CtorStruct create_CtorStruct() {
|
|||
return CtorStruct(1, 3.14f); // CXXTemporaryObjectExpr
|
||||
};
|
||||
|
||||
// CharacterLiteral variants
|
||||
const char char_value = 'a';
|
||||
const wchar_t wchar_t_value = L'ı';
|
||||
const char16_t char16_t_value = u'ç';
|
||||
const char32_t char32_t_value = U'∂';
|
||||
|
|
Loading…
Reference in New Issue