forked from OSchip/llvm-project
Driver: Update clang-interpreter example for r218938
llvm-svn: 218942
This commit is contained in:
parent
b264e4a325
commit
4075f6ce21
|
@ -111,7 +111,7 @@ int main(int argc, const char **argv, char * const *envp) {
|
|||
// We expect to get back exactly one command job, if we didn't something
|
||||
// failed. Extract that job from the compilation.
|
||||
const driver::JobList &Jobs = C->getJobs();
|
||||
if (Jobs.size() != 1 || !isa<driver::Command>(**Jobs.begin())) {
|
||||
if (Jobs.size() != 1 || !isa<driver::Command>(*Jobs.begin())) {
|
||||
SmallString<256> Msg;
|
||||
llvm::raw_svector_ostream OS(Msg);
|
||||
Jobs.Print(OS, "; ", true);
|
||||
|
@ -119,7 +119,7 @@ int main(int argc, const char **argv, char * const *envp) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
const driver::Command &Cmd = cast<driver::Command>(**Jobs.begin());
|
||||
const driver::Command &Cmd = cast<driver::Command>(*Jobs.begin());
|
||||
if (llvm::StringRef(Cmd.getCreator().getName()) != "clang") {
|
||||
Diags.Report(diag::err_fe_expected_clang_command);
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue