diff options
author | Sean Callanan <scallanan@apple.com> | 2017-07-11 00:27:57 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2017-07-11 00:27:57 +0000 |
commit | 6d5650252f9523a2063e52fecbc067146c7fe837 (patch) | |
tree | e9c99f107c850fcc8306b95660afab066715e512 /clang/tools/clang-import-test/clang-import-test.cpp | |
parent | fe0e145aed67ad779b6ce698cc5b30cc5dda29bd (diff) | |
download | bcm5719-llvm-6d5650252f9523a2063e52fecbc067146c7fe837.tar.gz bcm5719-llvm-6d5650252f9523a2063e52fecbc067146c7fe837.zip |
[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.
llvm-svn: 307602
Diffstat (limited to 'clang/tools/clang-import-test/clang-import-test.cpp')
-rw-r--r-- | clang/tools/clang-import-test/clang-import-test.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/clang/tools/clang-import-test/clang-import-test.cpp b/clang/tools/clang-import-test/clang-import-test.cpp index db4dc76eded..6b724e9cf5f 100644 --- a/clang/tools/clang-import-test/clang-import-test.cpp +++ b/clang/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 = |