diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Module/InstructionInfoTable.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/Module/InstructionInfoTable.cpp b/lib/Module/InstructionInfoTable.cpp index 390451f5..e08dc2b3 100644 --- a/lib/Module/InstructionInfoTable.cpp +++ b/lib/Module/InstructionInfoTable.cpp @@ -81,19 +81,12 @@ static std::string getDSPIPath(const DbgStopPointInst *dspi) { assert(res && "GetConstantStringInfo failed"); res = GetConstantStringInfo(dspi->getFileName(), file); assert(res && "GetConstantStringInfo failed"); - if (dir.empty()) { - return file; - } else if (*dir.rbegin() == '/') { - return dir + file; - } else { - return dir + "/" + file; - } -} #else static std::string getDSPIPath(DILocation Loc) { std::string dir = Loc.getDirectory(); std::string file = Loc.getFilename(); - if (dir.empty()) { +#endif + if (dir.empty() || file[0] == '/') { return file; } else if (*dir.rbegin() == '/') { return dir + file; @@ -101,7 +94,6 @@ static std::string getDSPIPath(DILocation Loc) { return dir + "/" + file; } } -#endif bool InstructionInfoTable::getInstructionDebugInfo(const llvm::Instruction *I, const std::string *&File, |