revert 88761 as it fails builds.

llvm-svn: 88762
This commit is contained in:
Sanjiv Gupta 2009-11-14 07:22:25 +00:00
parent 8f9c22646b
commit d03742a122
2 changed files with 6 additions and 12 deletions

View File

@ -138,7 +138,7 @@ bool AsmPrinter::doInitialization(Module &M) {
if (MMI)
MMI->AnalyzeModule(M);
DW = getAnalysisIfAvailable<DwarfWriter>();
if (DW && MAI->doesSupportDebugInformation())
if (DW)
DW->BeginModule(&M, MMI, O, this, MAI);
return false;

View File

@ -467,18 +467,12 @@ void PIC16DbgInfo::EmitVarDebugInfo(Module &M) {
void PIC16DbgInfo::SwitchToCU(MDNode *CU) {
// Get the file path from CU.
DICompileUnit cu(CU);
std::string FilePath = "";
if (cu.getDirectory()) {
std::string DirName = cu.getDirectory();
FilePath = FilePath + DirName + "/";
}
if (cu.getFilename()) {
std::string FileName = cu.getFilename();
FilePath = FilePath + FileName;
}
std::string DirName = cu.getDirectory();
std::string FileName = cu.getFilename();
std::string FilePath = DirName + "/" + FileName;
// Nothing to do if source file is still same or it is empty.
if ( FilePath == CurFile || FilePath == "") return;
// Nothing to do if source file is still same.
if ( FilePath == CurFile ) return;
// Else, close the current one and start a new.
if (CurFile != "") O << "\n\t.eof";