| 95 | } |
| 96 | |
| 97 | static inline std::string getFullPath(const llvm::DIFile &F) { |
| 98 | std::string Name = F.getFilename().str(); |
| 99 | std::string Dir = F.getDirectory().str(); |
| 100 | std::string Result; |
| 101 | |
| 102 | if (Name.rfind(Dir, 0) == 0) |
| 103 | Result = Name; |
| 104 | else if (Dir.size() > 0 && Dir.back() == '/') |
| 105 | Result = Dir + Name; |
| 106 | else |
| 107 | Result = Dir + '/' + Name; |
| 108 | |
| 109 | return util::getNormalizedPath(Result); |
| 110 | } |
| 111 | |
| 112 | } // namespace util |
| 113 | } // namespace ftg |
no test coverage detected