void setMetadata(unsigned KindID, MDNode *Node);
void setMetadata(const char *Kind, MDNode *Node);
- /// setDbgMetadata - This is just an optimized helper function that is
- /// equivalent to setMetadata("dbg", Node);
- void setDbgMetadata(MDNode *Node);
-
- /// getDbgMetadata - This is just an optimized helper function that is
- /// equivalent to calling getMetadata("dbg").
- MDNode *getDbgMetadata() const {
- return DbgLoc.getAsMDNode(getContext());
- }
-
/// setDebugLoc - Set the debug location information for this instruction.
void setDebugLoc(const DebugLoc &Loc) { DbgLoc = Loc; }
return getMetadataImpl(getContext().getMDKindID(Kind));
}
-void Instruction::setDbgMetadata(MDNode *Node) {
- DbgLoc = DebugLoc::getFromDILocation(Node);
-}
-
/// setMetadata - Set the metadata of of the specified kind to the specified
/// node. This updates/replaces metadata if already present, or removes it if
/// Node is null.