Commit 5e0be024 authored by Per's avatar Per

test for trait

parent e750dafe
......@@ -83,10 +83,16 @@ void CallGirlGraph::addToCallGirlGraph(Function *F)
{
const Function *Callee = CS.getCalledFunction();
if (!Callee || !Intrinsic::isLeaf(Callee->getIntrinsicID()))
{
// Indirect calls of intrinsics are not allowed so no need to check.
// We can be more precise here by using TargetArg returned by
// Intrinsic::isLeaf.
MDNode *metadata = CS->getMetadata(0);
errs() << "\n -- here -- " << I << "Callee:" << Callee;
Node->addCalledFunction(CS, CallsExternalNode.get());
}
else if (!Callee->isIntrinsic())
Node->addCalledFunction(CS, getOrInsertFunction(Callee));
}
......@@ -189,7 +195,11 @@ void CallGirlGraphNode::print(raw_ostream &OS) const
if (Function *FI = I.second->getFunction())
OS << "function '" << FI->getName() << "'\n";
else
{
OS << "external node, ooh no\n";
OS << "first: " << I.first << "\n";
OS << "second: " << I.second << "\n";
}
}
OS << '\n';
}
......
......@@ -13,5 +13,5 @@ panic = "abort"
[profile.release]
panic = "abort"
codegen-units = 1 # better optimizations
# debug = true # symbols are nice and they don't increase the size on Flash
debug = true # symbols are nice and they don't increase the size on Flash
lto = true # better optimizations
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