MCPcopy Create free account
hub / github.com/beefytech/Beef / AddInst

Method AddInst

IDEHelper/Backend/BeModule.cpp:124–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void BeInliner::AddInst(BeInst* destInst, BeInst* srcInst)
125{
126 if ((srcInst != NULL) && (srcInst->mDbgLoc != mSrcDbgLoc))
127 {
128 mSrcDbgLoc = srcInst->mDbgLoc;
129 if (mSrcDbgLoc == NULL)
130 {
131 mDestDbgLoc = NULL;
132 }
133 else
134 {
135 BeDbgLoc* inlinedAt = ExtendInlineDbgLoc(mSrcDbgLoc->mDbgInlinedAt);
136 mModule->SetCurrentDebugLocation(mSrcDbgLoc->mLine, mSrcDbgLoc->mColumn, (BeMDNode*)Remap(mSrcDbgLoc->mDbgScope), inlinedAt);
137 mDestDbgLoc = mModule->mCurDbgLoc;
138 }
139 }
140
141 if (srcInst != NULL)
142 destInst->mName = srcInst->mName;
143
144 destInst->mDbgLoc = mDestDbgLoc;
145 destInst->mParentBlock = mDestBlock;
146 mDestBlock->mInstructions.push_back(destInst);
147 if (srcInst != NULL)
148 mValueMap[srcInst] = destInst;
149}
150
151void BeInliner::Visit(BeValue* beValue)
152{

Callers 2

DoInliningMethod · 0.80
HandleNextCmdMethod · 0.80

Calls 3

push_backMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected