mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Changes to get some meaningful feedback from the bytecode reader. At some point this stuff should all be exception driven, but for now it is not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@970 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
#include <list>
|
||||
|
||||
// Enable to trace to figure out what the heck is going on when parsing fails
|
||||
#define TRACE_LEVEL 0
|
||||
#define TRACE_LEVEL 10
|
||||
|
||||
#if TRACE_LEVEL // ByteCodeReading_TRACEer
|
||||
#include "llvm/Assembly/Writer.h"
|
||||
@ -45,6 +45,7 @@ struct RawInst { // The raw fields out of the bytecode stream...
|
||||
};
|
||||
|
||||
class BytecodeParser : public AbstractTypeUser {
|
||||
string Error; // Error message string goes here...
|
||||
public:
|
||||
BytecodeParser() {
|
||||
// Define this in case we don't see a ModuleGlobalInfo block.
|
||||
@ -52,6 +53,9 @@ public:
|
||||
}
|
||||
|
||||
Module *ParseBytecode(const uchar *Buf, const uchar *EndBuf);
|
||||
|
||||
string getError() const { return Error; }
|
||||
|
||||
private: // All of this data is transient across calls to ParseBytecode
|
||||
Module *TheModule; // Current Module being read into...
|
||||
|
||||
|
Reference in New Issue
Block a user