mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
Avoid MSVC failure with default arguments in lambdas from r267270
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11700 llvm-svn: 267277
This commit is contained in:
parent
f5921278f9
commit
434859c97e
@ -1998,17 +1998,21 @@ std::error_code BitcodeReader::parseMetadata(bool ModuleLevel) {
|
||||
|
||||
PlaceholderQueue Placeholders;
|
||||
bool IsDistinct;
|
||||
auto getMD = [&](unsigned ID, bool AllowPlaceholders = true) -> Metadata * {
|
||||
if (!IsDistinct || !AllowPlaceholders)
|
||||
auto getMD = [&](unsigned ID) -> Metadata * {
|
||||
if (!IsDistinct)
|
||||
return MetadataList.getMetadataFwdRef(ID);
|
||||
if (auto *MD = MetadataList.getMetadataIfResolved(ID))
|
||||
return MD;
|
||||
return &Placeholders.getPlaceholderOp(ID);
|
||||
};
|
||||
auto getMDOrNull = [&](unsigned ID,
|
||||
bool AllowPlaceholders = true) -> Metadata * {
|
||||
auto getMDOrNull = [&](unsigned ID) -> Metadata * {
|
||||
if (ID)
|
||||
return getMD(ID - 1, AllowPlaceholders);
|
||||
return getMD(ID - 1);
|
||||
return nullptr;
|
||||
};
|
||||
auto getMDOrNullWithoutPlaceholders = [&](unsigned ID) -> Metadata * {
|
||||
if (ID)
|
||||
return MetadataList.getMetadataFwdRef(ID - 1);
|
||||
return nullptr;
|
||||
};
|
||||
auto getMDString = [&](unsigned ID) -> MDString *{
|
||||
@ -2331,8 +2335,7 @@ std::error_code BitcodeReader::parseMetadata(bool ModuleLevel) {
|
||||
MetadataList.assignValue(CU, NextMetadataNo++);
|
||||
|
||||
// Move the Upgrade the list of subprograms.
|
||||
if (Metadata *SPs =
|
||||
getMDOrNull(Record[11], /* AllowPlaceholders = */ false))
|
||||
if (Metadata *SPs = getMDOrNullWithoutPlaceholders(Record[11]))
|
||||
CUSubprograms.push_back({CU, SPs});
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user