mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Remove convenient but probably not worthwhile macro for lambda workaround
Cleanup from r305405 llvm-svn: 305731
This commit is contained in:
parent
0f7352d3aa
commit
4b68a50982
@ -518,14 +518,13 @@ static uint64_t readPointer(const DataExtractor &Data, uint32_t &Offset,
|
|||||||
// noreturn attribute usage in lambdas. Once the support for those
|
// noreturn attribute usage in lambdas. Once the support for those
|
||||||
// compilers are phased out, we can remove this and return back to
|
// compilers are phased out, we can remove this and return back to
|
||||||
// a ReportError lambda: [StartOffset](const char *ErrorMsg).
|
// a ReportError lambda: [StartOffset](const char *ErrorMsg).
|
||||||
#define ReportError(ErrorMsg) ReportErrorImpl(StartOffset,ErrorMsg)
|
static void LLVM_ATTRIBUTE_NORETURN ReportError(uint32_t StartOffset,
|
||||||
static void LLVM_ATTRIBUTE_NORETURN
|
const char *ErrorMsg) {
|
||||||
ReportErrorImpl(uint32_t StartOffset, const char *ErrorMsg) {
|
std::string Str;
|
||||||
std::string Str;
|
raw_string_ostream OS(Str);
|
||||||
raw_string_ostream OS(Str);
|
OS << format(ErrorMsg, StartOffset);
|
||||||
OS << format(ErrorMsg, StartOffset);
|
OS.flush();
|
||||||
OS.flush();
|
report_fatal_error(Str);
|
||||||
report_fatal_error(Str);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DWARFDebugFrame::parse(DataExtractor Data) {
|
void DWARFDebugFrame::parse(DataExtractor Data) {
|
||||||
@ -590,13 +589,15 @@ void DWARFDebugFrame::parse(DataExtractor Data) {
|
|||||||
for (unsigned i = 0, e = AugmentationString.size(); i != e; ++i) {
|
for (unsigned i = 0, e = AugmentationString.size(); i != e; ++i) {
|
||||||
switch (AugmentationString[i]) {
|
switch (AugmentationString[i]) {
|
||||||
default:
|
default:
|
||||||
ReportError("Unknown augmentation character in entry at %lx");
|
ReportError(StartOffset,
|
||||||
|
"Unknown augmentation character in entry at %lx");
|
||||||
case 'L':
|
case 'L':
|
||||||
LSDAPointerEncoding = Data.getU8(&Offset);
|
LSDAPointerEncoding = Data.getU8(&Offset);
|
||||||
break;
|
break;
|
||||||
case 'P': {
|
case 'P': {
|
||||||
if (Personality)
|
if (Personality)
|
||||||
ReportError("Duplicate personality in entry at %lx");
|
ReportError(StartOffset,
|
||||||
|
"Duplicate personality in entry at %lx");
|
||||||
PersonalityEncoding = Data.getU8(&Offset);
|
PersonalityEncoding = Data.getU8(&Offset);
|
||||||
Personality = readPointer(Data, Offset, *PersonalityEncoding);
|
Personality = readPointer(Data, Offset, *PersonalityEncoding);
|
||||||
break;
|
break;
|
||||||
@ -606,7 +607,8 @@ void DWARFDebugFrame::parse(DataExtractor Data) {
|
|||||||
break;
|
break;
|
||||||
case 'z':
|
case 'z':
|
||||||
if (i)
|
if (i)
|
||||||
ReportError("'z' must be the first character at %lx");
|
ReportError(StartOffset,
|
||||||
|
"'z' must be the first character at %lx");
|
||||||
// Parse the augmentation length first. We only parse it if
|
// Parse the augmentation length first. We only parse it if
|
||||||
// the string contains a 'z'.
|
// the string contains a 'z'.
|
||||||
AugmentationLength = Data.getULEB128(&Offset);
|
AugmentationLength = Data.getULEB128(&Offset);
|
||||||
@ -618,7 +620,7 @@ void DWARFDebugFrame::parse(DataExtractor Data) {
|
|||||||
|
|
||||||
if (AugmentationLength.hasValue()) {
|
if (AugmentationLength.hasValue()) {
|
||||||
if (Offset != EndAugmentationOffset)
|
if (Offset != EndAugmentationOffset)
|
||||||
ReportError("Parsing augmentation data at %lx failed");
|
ReportError(StartOffset, "Parsing augmentation data at %lx failed");
|
||||||
|
|
||||||
AugmentationData = Data.getData().slice(StartAugmentationOffset,
|
AugmentationData = Data.getData().slice(StartAugmentationOffset,
|
||||||
EndAugmentationOffset);
|
EndAugmentationOffset);
|
||||||
@ -645,7 +647,8 @@ void DWARFDebugFrame::parse(DataExtractor Data) {
|
|||||||
if (IsEH) {
|
if (IsEH) {
|
||||||
// The address size is encoded in the CIE we reference.
|
// The address size is encoded in the CIE we reference.
|
||||||
if (!Cie)
|
if (!Cie)
|
||||||
ReportError("Parsing FDE data at %lx failed due to missing CIE");
|
ReportError(StartOffset,
|
||||||
|
"Parsing FDE data at %lx failed due to missing CIE");
|
||||||
|
|
||||||
InitialLocation = readPointer(Data, Offset,
|
InitialLocation = readPointer(Data, Offset,
|
||||||
Cie->getFDEPointerEncoding());
|
Cie->getFDEPointerEncoding());
|
||||||
@ -665,7 +668,7 @@ void DWARFDebugFrame::parse(DataExtractor Data) {
|
|||||||
readPointer(Data, Offset, Cie->getLSDAPointerEncoding());
|
readPointer(Data, Offset, Cie->getLSDAPointerEncoding());
|
||||||
|
|
||||||
if (Offset != EndAugmentationOffset)
|
if (Offset != EndAugmentationOffset)
|
||||||
ReportError("Parsing augmentation data at %lx failed");
|
ReportError(StartOffset, "Parsing augmentation data at %lx failed");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
InitialLocation = Data.getAddress(&Offset);
|
InitialLocation = Data.getAddress(&Offset);
|
||||||
@ -680,7 +683,7 @@ void DWARFDebugFrame::parse(DataExtractor Data) {
|
|||||||
Entries.back()->parseInstructions(Data, &Offset, EndStructureOffset);
|
Entries.back()->parseInstructions(Data, &Offset, EndStructureOffset);
|
||||||
|
|
||||||
if (Offset != EndStructureOffset)
|
if (Offset != EndStructureOffset)
|
||||||
ReportError("Parsing entry instructions at %lx failed");
|
ReportError(StartOffset, "Parsing entry instructions at %lx failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user