forked from OSchip/llvm-project
parent
64c8a2e312
commit
ff90e627ba
|
@ -353,7 +353,7 @@ public:
|
||||||
/// Return the full path to the file.
|
/// Return the full path to the file.
|
||||||
std::string getAbsolutePath() const;
|
std::string getAbsolutePath() const;
|
||||||
/// Return the file name relative to the compilation directory.
|
/// Return the file name relative to the compilation directory.
|
||||||
StringRef getRelativePath() const { return File->getFilename(); }
|
StringRef getRelativePath() const;
|
||||||
unsigned getLine() const { return Line; }
|
unsigned getLine() const { return Line; }
|
||||||
unsigned getColumn() const { return Column; }
|
unsigned getColumn() const { return Column; }
|
||||||
};
|
};
|
||||||
|
|
|
@ -121,6 +121,10 @@ DiagnosticLocation::DiagnosticLocation(const DISubprogram *SP) {
|
||||||
Column = 0;
|
Column = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StringRef DiagnosticLocation::getRelativePath() const {
|
||||||
|
return File->getFilename();
|
||||||
|
}
|
||||||
|
|
||||||
std::string DiagnosticLocation::getAbsolutePath() const {
|
std::string DiagnosticLocation::getAbsolutePath() const {
|
||||||
StringRef Name = File->getFilename();
|
StringRef Name = File->getFilename();
|
||||||
if (sys::path::is_absolute(Name))
|
if (sys::path::is_absolute(Name))
|
||||||
|
|
Loading…
Reference in New Issue