[Lldb-commits] [lldb] r109887 - in /lldb/trunk: llvm.zip scripts/build-llvm.pl source/Expression/ClangExpression.cpp source/Expression/IRForTarget.cpp source/Symbol/ClangASTContext.cpp

Greg Clayton gclayton at apple.com
Fri Jul 30 13:30:45 PDT 2010


Author: gclayton
Date: Fri Jul 30 15:30:44 2010
New Revision: 109887

URL: http://llvm.org/viewvc/llvm-project?rev=109887&view=rev
Log:
Updated to llvm/clang from July 30, 2010 at 08:00.


Modified:
    lldb/trunk/llvm.zip
    lldb/trunk/scripts/build-llvm.pl
    lldb/trunk/source/Expression/ClangExpression.cpp
    lldb/trunk/source/Expression/IRForTarget.cpp
    lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/llvm.zip
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/llvm.zip?rev=109887&r1=109886&r2=109887&view=diff
==============================================================================
Binary files - no diff available.

Modified: lldb/trunk/scripts/build-llvm.pl
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/build-llvm.pl?rev=109887&r1=109886&r2=109887&view=diff
==============================================================================
--- lldb/trunk/scripts/build-llvm.pl (original)
+++ lldb/trunk/scripts/build-llvm.pl Fri Jul 30 15:30:44 2010
@@ -25,7 +25,7 @@
 
 our $llvm_configuration = $ENV{LLVM_CONFIGURATION};
 
-our $llvm_revision = "'{2010-07-20T16:00}'";
+our $llvm_revision = "'{2010-07-30T08:00}'";
 our $llvm_source_dir = "$ENV{SRCROOT}";
 our $cc = "$ENV{DEVELOPER_BIN_DIR}/gcc-4.2";
 our $cxx = "$ENV{DEVELOPER_BIN_DIR}/g++-4.2";

Modified: lldb/trunk/source/Expression/ClangExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpression.cpp?rev=109887&r1=109886&r2=109887&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpression.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpression.cpp Fri Jul 30 15:30:44 2010
@@ -107,74 +107,88 @@
 // Main driver
 //===----------------------------------------------------------------------===//
 
-void LLVMErrorHandler(void *UserData, const std::string &Message) {
-    Diagnostic &Diags = *static_cast<Diagnostic*>(UserData);
+//===----------------------------------------------------------------------===//
+// Main driver
+//===----------------------------------------------------------------------===//
 
-    Diags.Report(diag::err_fe_error_backend) << Message;
+static void LLVMErrorHandler(void *UserData, const std::string &Message) {
+  Diagnostic &Diags = *static_cast<Diagnostic*>(UserData);
 
-    // We cannot recover from llvm errors.
-    exit(1);
+  Diags.Report(diag::err_fe_error_backend) << Message;
+
+  // We cannot recover from llvm errors.
+  exit(1);
 }
 
 static FrontendAction *CreateFrontendBaseAction(CompilerInstance &CI) {
-    using namespace clang::frontend;
+  using namespace clang::frontend;
 
-    switch (CI.getFrontendOpts().ProgramAction) {
-        default:
-            llvm_unreachable("Invalid program action!");
-
-        case ASTDump:                return new ASTDumpAction();
-        case ASTPrint:               return new ASTPrintAction();
-        case ASTPrintXML:            return new ASTPrintXMLAction();
-        case ASTView:                return new ASTViewAction();
-        case DumpRawTokens:          return new DumpRawTokensAction();
-        case DumpTokens:             return new DumpTokensAction();
-        case EmitAssembly:           return new EmitAssemblyAction();
-        case EmitBC:                 return new EmitBCAction();
-        case EmitHTML:               return new HTMLPrintAction();
-        case EmitLLVM:               return new EmitLLVMAction();
-        case EmitLLVMOnly:           return new EmitLLVMOnlyAction();
-        case EmitObj:                return new EmitObjAction();
-        case FixIt:                  return new FixItAction();
-        case GeneratePCH:            return new GeneratePCHAction();
-        case GeneratePTH:            return new GeneratePTHAction();
-        case InheritanceView:        return new InheritanceViewAction();
-        case InitOnly:               return new InitOnlyAction();
-        case ParseNoop:              return new ParseOnlyAction();
-        case ParsePrintCallbacks:    return new PrintParseAction();
-        case ParseSyntaxOnly:        return new SyntaxOnlyAction();
-
-        case PluginAction: {
-            if (CI.getFrontendOpts().ActionName == "help") {
-                llvm::errs() << "clang -cc1 plugins:\n";
-                for (FrontendPluginRegistry::iterator it =
-                     FrontendPluginRegistry::begin(),
-                     ie = FrontendPluginRegistry::end();
-                     it != ie; ++it)
-                    llvm::errs() << "  " << it->getName() << " - " << it->getDesc() << "\n";
-                return 0;
-            }
+  switch (CI.getFrontendOpts().ProgramAction) {
+  default:
+    llvm_unreachable("Invalid program action!");
+
+  case ASTDump:                return new ASTDumpAction();
+  case ASTPrint:               return new ASTPrintAction();
+  case ASTPrintXML:            return new ASTPrintXMLAction();
+  case ASTView:                return new ASTViewAction();
+  case BoostCon:               return new BoostConAction();
+  case DumpRawTokens:          return new DumpRawTokensAction();
+  case DumpTokens:             return new DumpTokensAction();
+  case EmitAssembly:           return new EmitAssemblyAction();
+  case EmitBC:                 return new EmitBCAction();
+  case EmitHTML:               return new HTMLPrintAction();
+  case EmitLLVM:               return new EmitLLVMAction();
+  case EmitLLVMOnly:           return new EmitLLVMOnlyAction();
+  case EmitCodeGenOnly:        return new EmitCodeGenOnlyAction();
+  case EmitObj:                return new EmitObjAction();
+  case FixIt:                  return new FixItAction();
+  case GeneratePCH:            return new GeneratePCHAction();
+  case GeneratePTH:            return new GeneratePTHAction();
+  case InheritanceView:        return new InheritanceViewAction();
+  case InitOnly:               return new InitOnlyAction();
+  case ParseSyntaxOnly:        return new SyntaxOnlyAction();
+
+  case PluginAction: {
+
+    for (FrontendPluginRegistry::iterator it =
+           FrontendPluginRegistry::begin(), ie = FrontendPluginRegistry::end();
+         it != ie; ++it) {
+      if (it->getName() == CI.getFrontendOpts().ActionName) {
+        PluginASTAction* plugin = it->instantiate();
+        plugin->ParseArgs(CI.getFrontendOpts().PluginArgs);
+        return plugin;
+      }
+    }
 
-            for (FrontendPluginRegistry::iterator it =
-                 FrontendPluginRegistry::begin(), ie = FrontendPluginRegistry::end();
-                 it != ie; ++it) {
-                if (it->getName() == CI.getFrontendOpts().ActionName)
-                    return it->instantiate();
-            }
+    CI.getDiagnostics().Report(diag::err_fe_invalid_plugin_name)
+      << CI.getFrontendOpts().ActionName;
+    return 0;
+  }
 
-            CI.getDiagnostics().Report(diag::err_fe_invalid_plugin_name)
-            << CI.getFrontendOpts().ActionName;
-            return 0;
-        }
+  case PrintDeclContext:       return new DeclContextPrintAction();
+  case PrintPreamble:          return new PrintPreambleAction();
+  case PrintPreprocessedInput: return new PrintPreprocessedAction();
+  case RewriteMacros:          return new RewriteMacrosAction();
+  case RewriteObjC:            return new RewriteObjCAction();
+  case RewriteTest:            return new RewriteTestAction();
+  case RunAnalysis:            return new AnalysisAction();
+  case RunPreprocessorOnly:    return new PreprocessOnlyAction();
+  }
+}
+
+static FrontendAction *CreateFrontendAction(CompilerInstance &CI) {
+  // Create the underlying action.
+  FrontendAction *Act = CreateFrontendBaseAction(CI);
+  if (!Act)
+    return 0;
 
-        case PrintDeclContext:       return new DeclContextPrintAction();
-        case PrintPreprocessedInput: return new PrintPreprocessedAction();
-        case RewriteMacros:          return new RewriteMacrosAction();
-        case RewriteObjC:            return new RewriteObjCAction();
-        case RewriteTest:            return new RewriteTestAction();
-        case RunAnalysis:            return new AnalysisAction();
-        case RunPreprocessorOnly:    return new PreprocessOnlyAction();
-    }
+  // If there are any AST files to merge, create a frontend action
+  // adaptor to perform the merge.
+  if (!CI.getFrontendOpts().ASTMergeFiles.empty())
+    Act = new ASTMergeAction(Act, &CI.getFrontendOpts().ASTMergeFiles[0],
+                             CI.getFrontendOpts().ASTMergeFiles.size());
+
+  return Act;
 }
 
 //----------------------------------------------------------------------
@@ -330,7 +344,8 @@
                                          m_clang_ap->getTarget(),
                                          m_clang_ap->getPreprocessor().getIdentifierTable(),
                                          selector_table,
-                                         *builtin_ap.get());
+                                         *builtin_ap.get(),
+                                         0);
     
     llvm::OwningPtr<ExternalASTSource> ASTSource(new ClangASTSource(*Context, *m_decl_map));
 
@@ -426,24 +441,6 @@
     return num_errors;
 }
 
-static FrontendAction *
-CreateFrontendAction(CompilerInstance &CI)
-{
-    // Create the underlying action.
-    FrontendAction *Act = CreateFrontendBaseAction(CI);
-    if (!Act)
-        return 0;
-
-    // If there are any AST files to merge, create a frontend action
-    // adaptor to perform the merge.
-    if (!CI.getFrontendOpts().ASTMergeFiles.empty())
-        Act = new ASTMergeAction(Act, &CI.getFrontendOpts().ASTMergeFiles[0],
-                                 CI.getFrontendOpts().ASTMergeFiles.size());
-
-    return Act;
-}
-
-
 unsigned
 ClangExpression::ConvertExpressionToDWARF (ClangExpressionVariableList& expr_local_variable_list, 
                                            StreamString &dwarf_opcode_strm)

Modified: lldb/trunk/source/Expression/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRForTarget.cpp?rev=109887&r1=109886&r2=109887&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRForTarget.cpp (original)
+++ lldb/trunk/source/Expression/IRForTarget.cpp Fri Jul 30 15:30:44 2010
@@ -242,7 +242,7 @@
          ui != guard_load->use_end();
          ++ui)
     {
-        if (isa<Constant>(ui))
+        if (isa<Constant>(*ui))
         {
             // do nothing for the moment
         }

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=109887&r1=109886&r2=109887&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Jul 30 15:30:44 2010
@@ -306,7 +306,8 @@
                 *getTargetInfo(),
                 *getIdentifierTable(),
                 *getSelectorTable(),
-                *getBuiltinContext()));
+                *getBuiltinContext(),
+                0));
     }
     return m_ast_context_ap.get();
 }
@@ -954,7 +955,11 @@
 ClangASTContext::CreateBaseClassSpecifier (void *base_class_type, AccessType access, bool is_virtual, bool base_of_class)
 {
     if (base_class_type)
-        return new CXXBaseSpecifier(SourceRange(), is_virtual, base_of_class, (AccessSpecifier)access, QualType::getFromOpaquePtr(base_class_type));
+        return new CXXBaseSpecifier (SourceRange(), 
+                                     is_virtual, 
+                                     base_of_class, 
+                                     ConvertAccessTypeToAccessSpecifier (access), 
+                                     getASTContext()->CreateTypeSourceInfo (QualType::getFromOpaquePtr(base_class_type)));
     return NULL;
 }
 





More information about the lldb-commits mailing list