diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
commit | 173a4f43a911175643bda81ee675e8d9269056ea (patch) | |
tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /include/clang/Tooling/CompilationDatabase.h | |
parent | 88f7a7d5251a2d813460274c92decc143a11569b (diff) | |
download | FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.zip FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.tar.gz |
Vendor import of clang RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_350/final@216957
Diffstat (limited to 'include/clang/Tooling/CompilationDatabase.h')
-rw-r--r-- | include/clang/Tooling/CompilationDatabase.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/clang/Tooling/CompilationDatabase.h b/include/clang/Tooling/CompilationDatabase.h index 8cca329..d1e729a 100644 --- a/include/clang/Tooling/CompilationDatabase.h +++ b/include/clang/Tooling/CompilationDatabase.h @@ -30,9 +30,9 @@ #include "clang/Basic/LLVM.h" #include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Twine.h" +#include <memory> #include <string> #include <vector> @@ -42,8 +42,8 @@ namespace tooling { /// \brief Specifies the working directory and command of a compilation. struct CompileCommand { CompileCommand() {} - CompileCommand(Twine Directory, ArrayRef<std::string> CommandLine) - : Directory(Directory.str()), CommandLine(CommandLine) {} + CompileCommand(Twine Directory, std::vector<std::string> CommandLine) + : Directory(Directory.str()), CommandLine(std::move(CommandLine)) {} /// \brief The working directory the command was executed from. std::string Directory; @@ -166,7 +166,7 @@ public: /// The argument list is meant to be compatible with normal llvm command line /// parsing in main methods. /// int main(int argc, char **argv) { - /// OwningPtr<FixedCompilationDatabase> Compilations( + /// std::unique_ptr<FixedCompilationDatabase> Compilations( /// FixedCompilationDatabase::loadFromCommandLine(argc, argv)); /// cl::ParseCommandLineOptions(argc, argv); /// ... @@ -190,19 +190,19 @@ public: /// Will always return a vector with one entry that contains the directory /// and command line specified at construction with "clang-tool" as argv[0] /// and 'FilePath' as positional argument. - virtual std::vector<CompileCommand> getCompileCommands( - StringRef FilePath) const; + std::vector<CompileCommand> + getCompileCommands(StringRef FilePath) const override; /// \brief Returns the list of all files available in the compilation database. /// /// Note: This is always an empty list for the fixed compilation database. - virtual std::vector<std::string> getAllFiles() const; + std::vector<std::string> getAllFiles() const override; /// \brief Returns all compile commands for all the files in the compilation /// database. /// /// Note: This is always an empty list for the fixed compilation database. - virtual std::vector<CompileCommand> getAllCompileCommands() const; + std::vector<CompileCommand> getAllCompileCommands() const override; private: /// This is built up to contain a single entry vector to be returned from |