diff options
author | Devang Patel <dpatel@apple.com> | 2009-08-26 05:01:18 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-08-26 05:01:18 +0000 |
commit | 824598883513789516a919651f4b35e7a638ec5c (patch) | |
tree | 5a87b0b92a0c718d5f87d80b51cc4a6b9251eb63 /lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | be1f788676ff6a71bc0324ac38af7626fdcf92b2 (diff) |
Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index 5b4c79a9fd..4c60b29e91 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -335,7 +335,7 @@ bool FastISel::SelectCall(User *I) { if (isValidDebugInfoIntrinsic(*RSI, CodeGenOpt::None) && DW && DW->ShouldEmitDwarfDebug()) { unsigned ID = - DW->RecordRegionStart(RSI->getContext()); + DW->RecordRegionStart(cast<GlobalVariable>(RSI->getContext())); const TargetInstrDesc &II = TII.get(TargetInstrInfo::DBG_LABEL); BuildMI(MBB, DL, II).addImm(ID); } @@ -346,7 +346,7 @@ bool FastISel::SelectCall(User *I) { if (isValidDebugInfoIntrinsic(*REI, CodeGenOpt::None) && DW && DW->ShouldEmitDwarfDebug()) { unsigned ID = 0; - DISubprogram Subprogram(REI->getContext()); + DISubprogram Subprogram(cast<GlobalVariable>(REI->getContext())); if (isInlinedFnEnd(*REI, MF.getFunction())) { // This is end of an inlined function. const TargetInstrDesc &II = TII.get(TargetInstrInfo::DBG_LABEL); @@ -359,7 +359,7 @@ bool FastISel::SelectCall(User *I) { BuildMI(MBB, DL, II).addImm(ID); } else { const TargetInstrDesc &II = TII.get(TargetInstrInfo::DBG_LABEL); - ID = DW->RecordRegionEnd(REI->getContext()); + ID = DW->RecordRegionEnd(cast<GlobalVariable>(REI->getContext())); BuildMI(MBB, DL, II).addImm(ID); } } @@ -384,7 +384,7 @@ bool FastISel::SelectCall(User *I) { setCurDebugLoc(ExtractDebugLocation(*FSI, MF.getDebugLocInfo())); DebugLocTuple PrevLocTpl = MF.getDebugLocTuple(PrevLoc); - DISubprogram SP(FSI->getSubprogram()); + DISubprogram SP(cast<GlobalVariable>(FSI->getSubprogram())); unsigned LabelID = DW->RecordInlinedFnStart(SP, DICompileUnit(PrevLocTpl.CompileUnit), PrevLocTpl.Line, @@ -398,7 +398,7 @@ bool FastISel::SelectCall(User *I) { MF.setDefaultDebugLoc(ExtractDebugLocation(*FSI, MF.getDebugLocInfo())); // llvm.dbg.func_start also defines beginning of function scope. - DW->RecordRegionStart(FSI->getSubprogram()); + DW->RecordRegionStart(cast<GlobalVariable>(FSI->getSubprogram())); return true; } case Intrinsic::dbg_declare: { @@ -419,7 +419,10 @@ bool FastISel::SelectCall(User *I) { if (SI == StaticAllocaMap.end()) break; // VLAs. int FI = SI->second; - DW->RecordVariable(cast<MDNode>(Variable), FI); + // Determine the debug globalvariable. + GlobalValue *GV = cast<GlobalVariable>(Variable); + + DW->RecordVariable(cast<GlobalVariable>(GV), FI); return true; } case Intrinsic::eh_exception: { |