r218942 - Driver: Update clang-interpreter example for r218938

Justin Bogner mail at justinbogner.com
Thu Oct 2 18:08:28 PDT 2014


Author: bogner
Date: Thu Oct  2 20:08:27 2014
New Revision: 218942

URL: http://llvm.org/viewvc/llvm-project?rev=218942&view=rev
Log:
Driver: Update clang-interpreter example for r218938

Modified:
    cfe/trunk/examples/clang-interpreter/main.cpp

Modified: cfe/trunk/examples/clang-interpreter/main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/main.cpp?rev=218942&r1=218941&r2=218942&view=diff
==============================================================================
--- cfe/trunk/examples/clang-interpreter/main.cpp (original)
+++ cfe/trunk/examples/clang-interpreter/main.cpp Thu Oct  2 20:08:27 2014
@@ -111,7 +111,7 @@ int main(int argc, const char **argv, ch
   // 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, ch
     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;





More information about the cfe-commits mailing list