Index: clang-tools-extra/clang-move/tool/ClangMove.cpp =================================================================== --- clang-tools-extra/clang-move/tool/ClangMove.cpp +++ clang-tools-extra/clang-move/tool/ClangMove.cpp @@ -110,7 +110,7 @@ Tool.appendArgumentsAdjuster(tooling::getInsertArgumentAdjuster( "-fparse-all-comments", tooling::ArgumentInsertPosition::BEGIN)); move::MoveDefinitionSpec Spec; - Spec.Names = {Names.begin(), Names.end()}; + Spec.Names = (std::vector &)Names; Spec.OldHeader = OldHeader; Spec.NewHeader = NewHeader; Spec.OldCC = OldCC; Index: clang/include/clang/Frontend/FrontendOptions.h =================================================================== --- clang/include/clang/Frontend/FrontendOptions.h +++ clang/include/clang/Frontend/FrontendOptions.h @@ -18,7 +18,6 @@ #include #include #include -#include #include namespace llvm { @@ -366,7 +365,7 @@ std::string ARCMTMigrateReportOut; /// The input files and their types. - std::vector Inputs; + SmallVector Inputs; /// When the input is a module map, the original module map file from which /// that map was inferred, if any (for umbrella modules). @@ -391,33 +390,33 @@ std::string ActionName; /// Args to pass to the plugins - std::unordered_map> PluginArgs; + llvm::StringMap> PluginArgs; /// The list of plugin actions to run in addition to the normal action. - std::vector AddPluginActions; + SmallVector AddPluginActions; /// The list of plugins to load. - std::vector Plugins; + SmallVector Plugins; /// The list of module file extensions. - std::vector> ModuleFileExtensions; + SmallVector, 0> ModuleFileExtensions; /// The list of module map files to load before processing the input. - std::vector ModuleMapFiles; + SmallVector ModuleMapFiles; /// The list of additional prebuilt module files to load before /// processing the input. - std::vector ModuleFiles; + SmallVector ModuleFiles; /// The list of files to embed into the compiled module file. - std::vector ModulesEmbedFiles; + SmallVector ModulesEmbedFiles; /// The list of AST files to merge. - std::vector ASTMergeFiles; + SmallVector ASTMergeFiles; /// A list of arguments to forward to LLVM's option processing; this /// should only be used for debugging and experimental features. - std::vector LLVMArgs; + SmallVector LLVMArgs; /// File name of the file that will provide record layouts /// (in the format produced by -fdump-record-layouts). Index: llvm/include/llvm/ADT/SmallVector.h =================================================================== --- llvm/include/llvm/ADT/SmallVector.h +++ llvm/include/llvm/ADT/SmallVector.h @@ -31,6 +31,7 @@ #include #include #include +#include namespace llvm { @@ -900,6 +901,11 @@ this->assign(IL); return *this; } + + const SmallVector &operator=(const std::vector &Vec) { + this->assign(Vec.begin(), Vec.end()); + return *this; + } }; template