Skip to content
Snippets Groups Projects
Commit 3fb38ea0 authored by Sean Callanan's avatar Sean Callanan
Browse files

[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
parent 660c98f3
No related branches found
No related tags found
No related merge requests found
......@@ -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 =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment