if (!Slot) {
// FIXME - breaks down when the context is an inlined function.
DIDescriptor ParentDesc;
- DIDescriptor *DB = new DIBlock(V);
+ DIDescriptor *DB = new DIDescriptor(V);
if (DIBlock *Block = dyn_cast<DIBlock>(DB)) {
ParentDesc = Block->getContext();
}
void ConstructRootDbgScope(DbgScope *RootScope) {
// Exit if there is no root scope.
if (!RootScope) return;
+ if (!RootScope->getDesc()->isNull()) return;
// Get the subprogram debug information entry.
DISubprogram SPD(RootScope->getDesc()->getGV());
Asm->EmitInt8(0); Asm->EOL("DW_LNS_const_add_pc arg count");
Asm->EmitInt8(1); Asm->EOL("DW_LNS_fixed_advance_pc arg count");
- const UniqueVector<std::string> &Directories = MMI->getDirectories();
- const UniqueVector<SourceFileInfo> &SourceFiles = MMI->getSourceFiles();
-
// Emit directories.
for (unsigned DirectoryID = 1, NDID = Directories.size();
DirectoryID <= NDID; ++DirectoryID) {
Asm->EmitInt8(0); Asm->EOL("End of directories");
// Emit files.
- for (unsigned SourceID = 1, NSID = SourceFiles.size();
+ for (unsigned SourceID = 1, NSID = SrcFiles.size();
SourceID <= NSID; ++SourceID) {
- const SourceFileInfo &SourceFile = SourceFiles[SourceID];
+ const SrcFileInfo &SourceFile = SrcFiles[SourceID];
Asm->EmitString(SourceFile.getName());
Asm->EOL("Source");
Asm->EmitULEB128Bytes(SourceFile.getDirectoryID());
if (!LabelID) continue;
unsigned SourceID = LineInfo.getSourceID();
- const SourceFileInfo &SourceFile = SourceFiles[SourceID];
+ const SrcFileInfo &SourceFile = SrcFiles[SourceID];
unsigned DirectoryID = SourceFile.getDirectoryID();
if (VerboseAsm)
Asm->EOL(Directories[DirectoryID]
/// SetModuleInfo - Set machine module information when it's known that pass
/// manager has created it. Set by the target AsmPrinter.
void SetModuleInfo(MachineModuleInfo *mmi) {
+ assert (0 && "Who is this?");
// Make sure initial declarations are made.
if (!MMI && mmi->hasDebugInfo()) {
MMI = mmi;
}
// Construct scopes for subprogram.
- if (MMI->getRootScope())
- ConstructRootScope(MMI->getRootScope());
+ if (RootDbgScope)
+ ConstructRootDbgScope(RootDbgScope);
else
// FIXME: This is wrong. We are essentially getting past a problem with
// debug information not being able to handle unreachable blocks that have
// scope, i.e., one that encompasses the whole function. This isn't
// desirable. And a better way of handling this (and all of the debugging
// information) needs to be explored.
- ConstructDefaultScope(MF);
+ ConstructDefaultDbgScope(MF);
DebugFrames.push_back(FunctionDebugFrameInfo(SubprogramCount,
MMI->getFrameMoves()));
DD = new DwarfDebug(OS, A, T);
DE->BeginModule(M);
DD->BeginModule(M);
- DD->SetModuleInfo(MMI);
+ DD->SetDebugInfo(MMI);
DE->SetModuleInfo(MMI);
}