summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2017-07-11 00:27:57 +0000
committerSean Callanan <scallanan@apple.com>2017-07-11 00:27:57 +0000
commit3fb38ea0fb8cb74aae8d3054326682bdd34ae755 (patch)
tree57512cc0b4e09c2bee7425df318e0d53954ad1dc /tools
parent660c98f3e30c5c1b6aa566365ec22ea34d09eacf (diff)
[clang-import-test] Committed missed update to clang-import-test.cpp
I didn't commit clang-import-test.cpp in r307600, but it had some changes that were part of https://reviews.llvm.org/D35220 Corrected that now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307602 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/clang-import-test/clang-import-test.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/tools/clang-import-test/clang-import-test.cpp b/tools/clang-import-test/clang-import-test.cpp
index db4dc76ede..6b724e9cf5 100644
--- a/tools/clang-import-test/clang-import-test.cpp
+++ b/tools/clang-import-test/clang-import-test.cpp
@@ -182,14 +182,6 @@ BuildCompilerInstance(ArrayRef<const char *> ClangArgv) {
return Ins;
}
-std::unique_ptr<CompilerInstance>
-BuildCompilerInstance(ArrayRef<std::string> ClangArgs) {
- std::vector<const char *> ClangArgv(ClangArgs.size());
- std::transform(ClangArgs.begin(), ClangArgs.end(), ClangArgv.begin(),
- [](const std::string &s) -> const char * { return s.data(); });
- return init_convenience::BuildCompilerInstance(ClangArgv);
-}
-
std::unique_ptr<ASTContext>
BuildASTContext(CompilerInstance &CI, SelectorTable &ST, Builtin::Context &BC) {
auto AST = llvm::make_unique<ASTContext>(
@@ -313,14 +305,8 @@ int main(int argc, const char **argv) {
std::vector<std::unique_ptr<CompilerInstance>> IndirectCIs;
if (!Direct) {
for (auto &ImportCI : ImportCIs) {
- llvm::Expected<std::unique_ptr<CompilerInstance>> IndirectCI =
- BuildIndirect(ImportCI);
- if (auto E = IndirectCI.takeError()) {
- llvm::errs() << llvm::toString(std::move(E));
- exit(-1);
- } else {
- IndirectCIs.push_back(std::move(*IndirectCI));
- }
+ std::unique_ptr<CompilerInstance> IndirectCI = BuildIndirect(ImportCI);
+ IndirectCIs.push_back(std::move(IndirectCI));
}
}
llvm::Expected<std::unique_ptr<CompilerInstance>> ExpressionCI =