New version of StringRef brings a bunch of includes in etc.

Instead of copying over more includes, outline the only function in the
Interpreter which requires a full definition of llvm::StringRef.
This commit is contained in:
Vassil Vassilev 2017-05-24 00:11:48 +02:00 committed by sftnight
parent 8f257e74d3
commit 289da02b9b
2 changed files with 6 additions and 5 deletions

View File

@ -12,8 +12,6 @@
#include "cling/Interpreter/InvocationOptions.h"
#include "llvm/ADT/StringRef.h"
#include <cstdlib>
#include <memory>
#include <string>
@ -25,6 +23,7 @@ namespace llvm {
class ExecutionEngine;
class LLVMContext;
class Module;
class StringRef;
class Type;
template <typename T> class SmallVectorImpl;
}
@ -380,9 +379,7 @@ namespace cling {
///\brief Adds a single include path (-I).
///
void AddIncludePath(llvm::StringRef PathsStr) {
return AddIncludePaths(PathsStr, nullptr);
}
void AddIncludePath(llvm::StringRef PathsStr);
///\brief Prints the current include paths that are used.
///

View File

@ -477,6 +477,10 @@ namespace cling {
}
}
void Interpreter::AddIncludePath(llvm::StringRef PathsStr) {
return AddIncludePaths(PathsStr, nullptr);
}
void Interpreter::DumpIncludePath(llvm::raw_ostream* S) {
utils::DumpIncludePaths(getCI()->getHeaderSearchOpts(), S ? *S : cling::outs(),
true /*withSystem*/, true /*withFlags*/);