MCPcopy Create free account
hub / github.com/GANGE666/xVMP / copyComdat

Function copyComdat

src/lib/Transforms/Utils/CloneModule.cpp:22–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20using namespace llvm;
21
22static void copyComdat(GlobalObject *Dst, const GlobalObject *Src) {
23 const Comdat *SC = Src->getComdat();
24 if (!SC)
25 return;
26 Comdat *DC = Dst->getParent()->getOrInsertComdat(SC->getName());
27 DC->setSelectionKind(SC->getSelectionKind());
28 Dst->setComdat(DC);
29}
30
31/// This is not as easy as it might seem because we have to worry about making
32/// copies of global variables and functions, and making their (initializers and

Callers 1

CloneModuleMethod · 0.85

Calls 7

getOrInsertComdatMethod · 0.80
setSelectionKindMethod · 0.80
getSelectionKindMethod · 0.80
getComdatMethod · 0.45
getParentMethod · 0.45
getNameMethod · 0.45
setComdatMethod · 0.45

Tested by

no test coverage detected