示例#1
0
// Write definition of external node, which doesn't have any
// specific module associated with it. Typically this is function
// or variable defined in native object or library.
static void defineExternalNode(raw_ostream &OS, const char *Pfx,
                               const ValueInfo &VI) {
  auto StrId = std::to_string(VI.getGUID());
  OS << "  " << StrId << " [label=\"" << getNodeVisualName(VI)
     << "\"]; // defined externally\n";
}
示例#2
0
static std::string getNodeVisualName(const ValueInfo &VI) {
  return VI.name().empty() ? std::string("@") + std::to_string(VI.getGUID())
                           : VI.name().str();
}