diff options
Diffstat (limited to 'lib/Target/PIC16/PIC16DebugInfo.cpp')
-rw-r--r-- | lib/Target/PIC16/PIC16DebugInfo.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
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"; |