Goto statements with a bad label produces error message.

Now it also produces a short list of suggestions based on string distance.
This commit is contained in:
Nipunn Koorapati
2012-04-20 14:42:14 -04:00
parent db8b08131f
commit 040421942f
5 changed files with 51 additions and 3 deletions

4
ctx.h
View File

@@ -248,6 +248,10 @@ public:
new basic block that it starts. */
llvm::BasicBlock *GetLabeledBasicBlock(const std::string &label);
/** Returns a vector of all labels in the context. This is
simply the key set of the labelMap */
std::vector<std::string> GetLabels();
/** Called to generate code for 'return' statement; value is the
expression in the return statement (if non-NULL), and
doCoherenceCheck indicates whether instructions should be generated