aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-11-14 07:22:25 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-11-14 07:22:25 +0000
commit9a501cf19dbf1f56f0782ddba4c1931565af9610 (patch)
treefc493f6cbfa5e37bdc5d329f85d483aeabe14328 /lib
parent6fb01a7750e3edd73a7fba957e7f55f5956a760d (diff)
revert 88761 as it fails builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp2
-rw-r--r--lib/Target/PIC16/PIC16DebugInfo.cpp16
2 files changed, 6 insertions, 12 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 6d660a60c3..7c5c23b268 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -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;
diff --git a/lib/Target/PIC16/PIC16DebugInfo.cpp b/lib/Target/PIC16/PIC16DebugInfo.cpp
index 49df457af7..0ed44d21fc 100644
--- a/lib/Target/PIC16/PIC16DebugInfo.cpp
+++ b/lib/Target/PIC16/PIC16DebugInfo.cpp
@@ -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";