Commit 2e78a5d0 authored by Kunshan Wang's avatar Kunshan Wang

Tested the new API.

parent b39d6f9e
......@@ -368,7 +368,7 @@ class BundleConstructor(idNameMap: Map[MuID, MuName], nodeList: Seq[IRBuilderNod
case NodeGetIRef(id, resultID, refty, opnd) =>
InstGetIRef(refty, opnd) --> resultID
case NodeGetFieldIRef(id, resultID, isPtr, refty, index, opnd) =>
InstGetFieldIRef(isPtr, needStruct(refty), index, opnd) --> resultID
InstGetFieldIRef(isPtr, needAbsStruct(refty), index, opnd) --> resultID
case NodeGetElemIRef(id, resultID, isPtr, refty, indty, opnd, index) =>
InstGetElemIRef(isPtr, needSeq(refty), needInt(indty), opnd, index) --> resultID
case NodeShiftIRef(id, resultID, isPtr, refty, offty, opnd, offset) =>
......
......@@ -30,8 +30,9 @@ class NodeIDNotFoundException(id: MuID, name: Option[MuName], cause: Throwable =
* Thrown if a MuID cannot be resolved
*/
class UnknownIDException(id: MuID, name: Option[MuName], cause: Throwable = null) extends {
private val msg = ("MuID %d (name: %s) is not defined" +
private val msg = ("MuID %d (name: %s) is not defined. " +
"If your Mu IR bundle refers to previously loaded entities, make sure the IDs are correct. " +
"If it refers to entities in the current bundle, make sure they have the appropriate types.").format(
"If it refers to entities in the current bundle, make sure they have the appropriate types. " +
"Also check if all instructions in a basic block are listed in the new_bb's arguments.").format(
id, name.getOrElse("(no name)"))
} with IRBuilderException(msg, cause)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment