Skip to content

Commit 49ca2d7

Browse files
author
Valery N Dmitriev
committed
Merge from 'master' to 'sycl-web' (#2)
CONFLICT (content): Merge conflict in clang/lib/Sema/SemaType.cpp
2 parents 6283b03 + 6aea36f commit 49ca2d7

File tree

6 files changed

+15
-17
lines changed

6 files changed

+15
-17
lines changed

clang/lib/Sema/SemaType.cpp

+10-8
Original file line numberDiff line numberDiff line change
@@ -7772,15 +7772,17 @@ static bool isPermittedNeonBaseType(QualType &Ty,
77727772
static bool verifyValidIntegerConstantExpr(Sema &S, const ParsedAttr &Attr,
77737773
llvm::APSInt &Result) {
77747774
const auto *AttrExpr = Attr.getArgAsExpr(0);
7775-
if (AttrExpr->isTypeDependent() || AttrExpr->isValueDependent() ||
7776-
!AttrExpr->isIntegerConstantExpr(S.Context)) {
7777-
S.Diag(Attr.getLoc(), diag::err_attribute_argument_type)
7778-
<< Attr << AANT_ArgumentIntegerConstant << AttrExpr->getSourceRange();
7779-
Attr.setInvalid();
7780-
return false;
7775+
if (!AttrExpr->isTypeDependent() && !AttrExpr->isValueDependent()) {
7776+
if (Optional<llvm::APSInt> Res =
7777+
AttrExpr->getIntegerConstantExpr(S.Context)) {
7778+
Result = *Res;
7779+
return true;
7780+
}
77817781
}
7782-
Result = AttrExpr->getIntegerConstantExpr(S.Context).getValue();
7783-
return true;
7782+
S.Diag(Attr.getLoc(), diag::err_attribute_argument_type)
7783+
<< Attr << AANT_ArgumentIntegerConstant << AttrExpr->getSourceRange();
7784+
Attr.setInvalid();
7785+
return false;
77847786
}
77857787

77867788
/// HandleNeonVectorTypeAttr - The "neon_vector_type" and

lldb/unittests/Expression/DWARFExpressionTest.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ TEST(DWARFExpression, DW_OP_convert) {
9494
" - Attribute: DW_AT_byte_size\n"
9595
" Form: DW_FORM_data1\n"
9696
"debug_info:\n"
97-
" - Length: 0\n"
98-
" Version: 4\n"
97+
" - Version: 4\n"
9998
" AbbrOffset: 0\n"
10099
" AddrSize: 8\n"
101100
" Entries:\n"

lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ TEST_F(DWARFASTParserClangTests,
5656
" - Attribute: DW_AT_byte_size\n"
5757
" Form: DW_FORM_data1\n"
5858
"debug_info:\n"
59-
" - Length: 0\n"
60-
" Version: 4\n"
59+
" - Version: 4\n"
6160
" AbbrOffset: 0\n"
6261
" AddrSize: 8\n"
6362
" Entries:\n"

llvm/lib/ObjectYAML/DWARFYAML.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void MappingTraits<DWARFYAML::PubSection>::mapping(
143143

144144
void MappingTraits<DWARFYAML::Unit>::mapping(IO &IO, DWARFYAML::Unit &Unit) {
145145
IO.mapOptional("Format", Unit.Format, dwarf::DWARF32);
146-
IO.mapRequired("Length", Unit.Length);
146+
IO.mapOptional("Length", Unit.Length, 0);
147147
IO.mapRequired("Version", Unit.Version);
148148
if (Unit.Version >= 5)
149149
IO.mapRequired("UnitType", Unit.Type);

llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1368,8 +1368,7 @@ TEST(DWARFDebugInfo, TestEmptyChildren) {
13681368
" Children: DW_CHILDREN_yes\n"
13691369
" Attributes:\n"
13701370
"debug_info:\n"
1371-
" - Length: 0\n"
1372-
" Version: 4\n"
1371+
" - Version: 4\n"
13731372
" AbbrOffset: 0\n"
13741373
" AddrSize: 8\n"
13751374
" Entries:\n"

llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ TEST(DWARFDie, getLocations) {
3434
- Attribute: DW_AT_call_data_location
3535
Form: DW_FORM_sec_offset
3636
debug_info:
37-
- Length: 0
38-
Version: 5
37+
- Version: 5
3938
UnitType: DW_UT_compile
4039
AbbrOffset: 0
4140
AddrSize: 4

0 commit comments

Comments
 (0)