diff options
Diffstat (limited to 'lib/Tooling/Execution.cpp')
-rw-r--r-- | lib/Tooling/Execution.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Tooling/Execution.cpp b/lib/Tooling/Execution.cpp index 498d683f8924a..7ae67747acb2c 100644 --- a/lib/Tooling/Execution.cpp +++ b/lib/Tooling/Execution.cpp @@ -21,10 +21,10 @@ static llvm::cl::opt<std::string> llvm::cl::init("standalone")); void InMemoryToolResults::addResult(StringRef Key, StringRef Value) { - KVResults.push_back({Key.str(), Value.str()}); + KVResults.push_back({Strings.save(Key), Strings.save(Value)}); } -std::vector<std::pair<std::string, std::string>> +std::vector<std::pair<llvm::StringRef, llvm::StringRef>> InMemoryToolResults::AllKVResults() { return KVResults; } @@ -96,10 +96,13 @@ createExecutorFromCommandLineArgs(int &argc, const char **argv, } // This anchor is used to force the linker to link in the generated object file -// and thus register the StandaloneToolExecutorPlugin. +// and thus register the StandaloneToolExecutorPlugin etc. extern volatile int StandaloneToolExecutorAnchorSource; +extern volatile int AllTUsToolExecutorAnchorSource; static int LLVM_ATTRIBUTE_UNUSED StandaloneToolExecutorAnchorDest = StandaloneToolExecutorAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED AllTUsToolExecutorAnchorDest = + AllTUsToolExecutorAnchorSource; } // end namespace tooling } // end namespace clang |