Fix non-modular build.
authorAdrian Prantl <aprantl@apple.com>
Mon, 3 Dec 2018 18:07:03 +0000 (18:07 +0000)
committerAdrian Prantl <aprantl@apple.com>
Mon, 3 Dec 2018 18:07:03 +0000 (18:07 +0000)
llvm-svn: 348157

llvm/include/llvm/IR/DiagnosticInfo.h
llvm/lib/IR/DiagnosticInfo.cpp

index e98ab29..b5ed2c7 100644 (file)
@@ -353,7 +353,7 @@ public:
   /// Return the full path to the file.
   std::string getAbsolutePath() const;
   /// Return the file name relative to the compilation directory.
-  StringRef getRelativePath() const { return File->getFilename(); }
+  StringRef getRelativePath() const;
   unsigned getLine() const { return Line; }
   unsigned getColumn() const { return Column; }
 };
index fc6f5f1..3c6665b 100644 (file)
@@ -121,6 +121,10 @@ DiagnosticLocation::DiagnosticLocation(const DISubprogram *SP) {
   Column = 0;
 }
 
+StringRef DiagnosticLocation::getRelativePath() const {
+  return File->getFilename();
+}
+
 std::string DiagnosticLocation::getAbsolutePath() const {
   StringRef Name = File->getFilename();
   if (sys::path::is_absolute(Name))