summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/lib/Tooling/Execution.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-01-27 16:42:12 +0000
committerpatrick <patrick@openbsd.org>2019-01-27 16:42:12 +0000
commitb773203fb58f3ef282fb69c832d8710cab5bc82d (patch)
treee75913f147570fbd75169647b144df85b88a038c /gnu/llvm/tools/clang/lib/Tooling/Execution.cpp
parenttweak errno in previous (diff)
downloadwireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.tar.xz
wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.zip
Import LLVM 7.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/tools/clang/lib/Tooling/Execution.cpp')
-rw-r--r--gnu/llvm/tools/clang/lib/Tooling/Execution.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/gnu/llvm/tools/clang/lib/Tooling/Execution.cpp b/gnu/llvm/tools/clang/lib/Tooling/Execution.cpp
index 498d683f892..7ae67747acb 100644
--- a/gnu/llvm/tools/clang/lib/Tooling/Execution.cpp
+++ b/gnu/llvm/tools/clang/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