From 9207a2e495c8363606861e4f034504ec5c153dab Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Fri, 21 Oct 2011 15:39:28 +0800 Subject: Apply changes to migrate to LLVM upstream Oct 20th 2011. - StructType::isAnonymous is renamed to StructType::isLiteral. - PassManagerBuilder has been moved from llvm/Support/PassManagerBuilder.h to llvm/Transforms/IPO/PassManagerBuilder.h - Include llvm/Transforms/IPO.h for llvm::createInternalizePass. - clang::DiagClient has be renamed to clang::DiagnosticConsumer. Besides, we have to implement one additional pure virtual method 'clone' for create a clone of slang::DiagnosticBuffer. - llvm::Linker::LinkModules comes with one additional parameter. Passing llvm::Linker::DestroySource should be equivalent to the old code we were using. - slang::Slang is now derived from clang::ModuleLoader and implemented loadModule pure virtual method (though we will always return NULL.) - clang::Preprocessor is taking one additional parameter for clang::ModuleLoader. - clang::Diagnostic has been changed. A lot of the method has been moved to clang::DiagnosticsEngine, and we can no longer 'Report' a diagnostic from clang::Diagnostic. We have to use clang::DiagnosticEngine instead. - llvm::setCodeModel has been removed. Change-Id: I1f2a4cbeaf61a8ed1d0d635a5a0e1baa90d99d07 --- BitWriter_2_9/BitcodeWriter.cpp | 2 +- BitWriter_2_9/ValueEnumerator.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'BitWriter_2_9') diff --git a/BitWriter_2_9/BitcodeWriter.cpp b/BitWriter_2_9/BitcodeWriter.cpp index 3eab55d..c4f8e75 100644 --- a/BitWriter_2_9/BitcodeWriter.cpp +++ b/BitWriter_2_9/BitcodeWriter.cpp @@ -181,7 +181,7 @@ static void WriteTypeSymbolTable(const ValueEnumerator &VE, switch (T->getTypeID()) { case Type::StructTyID: { StructType *ST = cast(T); - if (ST->isAnonymous()) { + if (ST->isLiteral()) { // Skip anonymous struct definitions in type symbol table // FIXME(srhines) break; diff --git a/BitWriter_2_9/ValueEnumerator.cpp b/BitWriter_2_9/ValueEnumerator.cpp index db766b1..9ae9905 100644 --- a/BitWriter_2_9/ValueEnumerator.cpp +++ b/BitWriter_2_9/ValueEnumerator.cpp @@ -326,7 +326,7 @@ void ValueEnumerator::EnumerateType(Type *Ty) { // don't recursively visit it. This is safe because we allow forward // references of these in the bitcode reader. if (StructType *STy = dyn_cast(Ty)) - if (!STy->isAnonymous()) + if (!STy->isLiteral()) *TypeID = ~0U; // Enumerate all of the subtypes before we enumerate this type. This ensures -- cgit v1.2.3