mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Temporarily revert r192749 as it is causing problems for LTO and
requires a more in depth change to the IR structure. llvm-svn: 192938
This commit is contained in:
parent
62e2c71670
commit
1dfc9a91b2
@ -827,7 +827,14 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) {
|
|||||||
|
|
||||||
// Construct subprogram DIE.
|
// Construct subprogram DIE.
|
||||||
void DwarfDebug::constructSubprogramDIE(CompileUnit *TheCU, const MDNode *N) {
|
void DwarfDebug::constructSubprogramDIE(CompileUnit *TheCU, const MDNode *N) {
|
||||||
assert(!SPMap[N] && "Trying to create a subprogram DIE twice!");
|
// FIXME: We should only call this routine once, however, during LTO if a
|
||||||
|
// program is defined in multiple CUs we could end up calling it out of
|
||||||
|
// beginModule as we walk the CUs.
|
||||||
|
|
||||||
|
CompileUnit *&CURef = SPMap[N];
|
||||||
|
if (CURef)
|
||||||
|
return;
|
||||||
|
CURef = TheCU;
|
||||||
|
|
||||||
DISubprogram SP(N);
|
DISubprogram SP(N);
|
||||||
if (!SP.isDefinition())
|
if (!SP.isDefinition())
|
||||||
@ -836,7 +843,6 @@ void DwarfDebug::constructSubprogramDIE(CompileUnit *TheCU, const MDNode *N) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
DIE *SubprogramDie = TheCU->getOrCreateSubprogramDIE(SP);
|
DIE *SubprogramDie = TheCU->getOrCreateSubprogramDIE(SP);
|
||||||
SPMap[N] = TheCU;
|
|
||||||
|
|
||||||
// Expose as a global name.
|
// Expose as a global name.
|
||||||
TheCU->addGlobalName(SP.getName(), SubprogramDie, resolve(SP.getContext()));
|
TheCU->addGlobalName(SP.getName(), SubprogramDie, resolve(SP.getContext()));
|
||||||
|
Loading…
Reference in New Issue
Block a user