mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Change the verifier to never throw an exception. Instead verifyModule canoptionally return the string error, which is an easier api for clients touse anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29017 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -117,12 +117,10 @@ public:
|
||||
bca.functionDensity = double(bca.BlockSizes[BytecodeFormat::FunctionBlockID]) /
|
||||
double(bca.numFunctions);
|
||||
|
||||
if ( bca.progressiveVerify ) {
|
||||
try {
|
||||
verifyModule(*M, ThrowExceptionAction);
|
||||
} catch ( std::string& msg ) {
|
||||
if (bca.progressiveVerify) {
|
||||
std::string msg;
|
||||
if (verifyModule(*M, ReturnStatusAction, &msg))
|
||||
bca.VerifyInfo += "Verify@Finish: " + msg + "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,12 +133,10 @@ public:
|
||||
virtual void handleModuleEnd(const std::string& id) {
|
||||
if (os)
|
||||
*os << " } End Module " << id << "\n";
|
||||
if ( bca.progressiveVerify ) {
|
||||
try {
|
||||
verifyModule(*M, ThrowExceptionAction);
|
||||
} catch ( std::string& msg ) {
|
||||
if (bca.progressiveVerify) {
|
||||
std::string msg;
|
||||
if (verifyModule(*M, ReturnStatusAction, &msg))
|
||||
bca.VerifyInfo += "Verify@EndModule: " + msg + "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,12 +228,10 @@ public:
|
||||
virtual void handleModuleGlobalsEnd() {
|
||||
if (os)
|
||||
*os << " } END BLOCK: ModuleGlobalInfo\n";
|
||||
if ( bca.progressiveVerify ) {
|
||||
try {
|
||||
verifyModule(*M, ThrowExceptionAction);
|
||||
} catch ( std::string& msg ) {
|
||||
if (bca.progressiveVerify) {
|
||||
std::string msg;
|
||||
if (verifyModule(*M, ReturnStatusAction, &msg))
|
||||
bca.VerifyInfo += "Verify@EndModuleGlobalInfo: " + msg + "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -346,12 +340,10 @@ public:
|
||||
currFunc->density = double(currFunc->byteSize) /
|
||||
double(currFunc->numInstructions);
|
||||
|
||||
if ( bca.progressiveVerify ) {
|
||||
try {
|
||||
verifyModule(*M, ThrowExceptionAction);
|
||||
} catch ( std::string& msg ) {
|
||||
if (bca.progressiveVerify) {
|
||||
std::string msg;
|
||||
if (verifyModule(*M, ReturnStatusAction, &msg))
|
||||
bca.VerifyInfo += "Verify@EndFunction: " + msg + "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -522,12 +514,10 @@ public:
|
||||
if (os)
|
||||
*os << " } END BLOCK: GlobalConstants\n";
|
||||
|
||||
if ( bca.progressiveVerify ) {
|
||||
try {
|
||||
verifyModule(*M, ThrowExceptionAction);
|
||||
} catch ( std::string& msg ) {
|
||||
if (bca.progressiveVerify) {
|
||||
std::string msg;
|
||||
if (verifyModule(*M, ReturnStatusAction, &msg))
|
||||
bca.VerifyInfo += "Verify@EndGlobalConstants: " + msg + "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user