mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-29 13:32:33 +00:00
Improve comments in the LSDA somewhat. They can be improved much more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95707 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c9745049e6
commit
1f8075d7d2
@ -34,6 +34,7 @@
|
|||||||
#include "llvm/Support/Timer.h"
|
#include "llvm/Support/Timer.h"
|
||||||
#include "llvm/ADT/SmallString.h"
|
#include "llvm/ADT/SmallString.h"
|
||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
|
#include "llvm/ADT/Twine.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
DwarfException::DwarfException(raw_ostream &OS, AsmPrinter *A,
|
DwarfException::DwarfException(raw_ostream &OS, AsmPrinter *A,
|
||||||
@ -868,13 +869,14 @@ void DwarfException::EmitExceptionTable() {
|
|||||||
|
|
||||||
// Offset of the landing pad, counted in 16-byte bundles relative to the
|
// Offset of the landing pad, counted in 16-byte bundles relative to the
|
||||||
// @LPStart address.
|
// @LPStart address.
|
||||||
if (!S.PadLabel)
|
if (!S.PadLabel) {
|
||||||
|
Asm->OutStreamer.AddComment("Landing pad");
|
||||||
Asm->OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/);
|
Asm->OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/);
|
||||||
else
|
} else {
|
||||||
EmitSectionOffset("label", "eh_func_begin", S.PadLabel, SubprogramCount,
|
EmitSectionOffset("label", "eh_func_begin", S.PadLabel, SubprogramCount,
|
||||||
true, true);
|
true, true);
|
||||||
|
EOL("Landing pad");
|
||||||
EOL("Landing pad");
|
}
|
||||||
|
|
||||||
// Offset of the first associated action record, relative to the start of
|
// Offset of the first associated action record, relative to the start of
|
||||||
// the action table. This value is biased by 1 (1 indicates the start of
|
// the action table. This value is biased by 1 (1 indicates the start of
|
||||||
@ -884,35 +886,40 @@ void DwarfException::EmitExceptionTable() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Emit the Action Table.
|
// Emit the Action Table.
|
||||||
|
EOL("Action Record Table:");
|
||||||
|
unsigned Iter = 1;
|
||||||
for (SmallVectorImpl<ActionEntry>::const_iterator
|
for (SmallVectorImpl<ActionEntry>::const_iterator
|
||||||
I = Actions.begin(), E = Actions.end(); I != E; ++I) {
|
I = Actions.begin(), E = Actions.end(); I != E; ++I) {
|
||||||
const ActionEntry &Action = *I;
|
const ActionEntry &Action = *I;
|
||||||
|
EOL(Twine("Action Record ") + Twine(Iter++));
|
||||||
|
|
||||||
// Type Filter
|
// Type Filter
|
||||||
//
|
//
|
||||||
// Used by the runtime to match the type of the thrown exception to the
|
// Used by the runtime to match the type of the thrown exception to the
|
||||||
// type of the catch clauses or the types in the exception specification.
|
// type of the catch clauses or the types in the exception specification.
|
||||||
EmitSLEB128(Action.ValueForTypeID, "TypeInfo index");
|
EmitSLEB128(Action.ValueForTypeID, " TypeInfo index");
|
||||||
|
|
||||||
// Action Record
|
// Action Record
|
||||||
//
|
//
|
||||||
// Self-relative signed displacement in bytes of the next action record,
|
// Self-relative signed displacement in bytes of the next action record,
|
||||||
// or 0 if there is no next action record.
|
// or 0 if there is no next action record.
|
||||||
EmitSLEB128(Action.NextAction, "Next action");
|
EmitSLEB128(Action.NextAction, " Next action");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emit the Catch TypeInfos.
|
// Emit the Catch TypeInfos.
|
||||||
|
Iter = TypeInfos.size();
|
||||||
for (std::vector<GlobalVariable *>::const_reverse_iterator
|
for (std::vector<GlobalVariable *>::const_reverse_iterator
|
||||||
I = TypeInfos.rbegin(), E = TypeInfos.rend(); I != E; ++I) {
|
I = TypeInfos.rbegin(), E = TypeInfos.rend(); I != E; ++I) {
|
||||||
const GlobalVariable *GV = *I;
|
const GlobalVariable *GV = *I;
|
||||||
PrintRelDirective();
|
PrintRelDirective();
|
||||||
|
|
||||||
if (GV)
|
if (GV) {
|
||||||
O << *Asm->GetGlobalValueSymbol(GV);
|
O << *Asm->GetGlobalValueSymbol(GV);
|
||||||
else
|
EOL(Twine("TypeInfo ") + Twine(Iter--));
|
||||||
|
} else {
|
||||||
O << "0x0";
|
O << "0x0";
|
||||||
|
EOL("");
|
||||||
EOL("TypeInfo");
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emit the Exception Specifications.
|
// Emit the Exception Specifications.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user