File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
Inputs/clang-importer-sdk/usr/include Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -480,10 +480,17 @@ namespace {
480
480
Bridgeability::None);
481
481
if (!elementType)
482
482
return Type ();
483
+
484
+ auto size = type->getSize ().getZExtValue ();
485
+ // An array of size N is importat as an N-element tuple which
486
+ // takes very long to compile. We choose 4096 as the upper limit because
487
+ // we don't want to break arrays of size PATH_MAX.
488
+ if (size > 4096 )
489
+ return Type ();
483
490
484
491
TupleTypeElt elt (elementType);
485
492
SmallVector<TupleTypeElt, 8 > elts;
486
- for (size_t i = 0 , size = type-> getSize (). getZExtValue () ; i < size; ++i)
493
+ for (size_t i = 0 ; i < size; ++i)
487
494
elts.push_back (elt);
488
495
489
496
return TupleType::get (elts, elementType->getASTContext ());
You can’t perform that action at this time.
0 commit comments