Apply changes to migrate to CLANG-160673-20120724.
Change-Id: I666df2ff91532318883dd48ea1249178b2ebda81
diff --git a/Android.mk b/Android.mk
index 4339e5e..28e705c 100644
--- a/Android.mk
+++ b/Android.mk
@@ -56,8 +56,8 @@
libLLVMCodeGen \
libLLVMScalarOpts \
libLLVMInstCombine \
- libLLVMTransformUtils \
libLLVMInstrumentation \
+ libLLVMTransformUtils \
libLLVMipa \
libLLVMAnalysis \
libLLVMTarget \
@@ -94,6 +94,7 @@
TBLGEN_TABLES := \
AttrList.inc \
Attrs.inc \
+ CommentNodes.inc \
DeclNodes.inc \
DiagnosticCommonKinds.inc \
DiagnosticFrontendKinds.inc \
@@ -200,6 +201,7 @@
TBLGEN_TABLES := \
AttrList.inc \
Attrs.inc \
+ CommentNodes.inc \
DeclNodes.inc \
DiagnosticCommonKinds.inc \
DiagnosticDriverKinds.inc \
diff --git a/llvm-rs-cc.cpp b/llvm-rs-cc.cpp
index 2cd7bb0..495489a 100644
--- a/llvm-rs-cc.cpp
+++ b/llvm-rs-cc.cpp
@@ -57,6 +57,7 @@
using clang::driver::InputArgList;
using clang::driver::Option;
using clang::driver::OptTable;
+using namespace clang::driver::options;
// SaveStringInSet, ExpandArgsFromBuf and ExpandArgv are all copied from
// $(CLANG_ROOT)/tools/driver/driver.cpp for processing argc/argv passed in
@@ -84,7 +85,7 @@
static const OptTable::Info RSCCInfoTable[] = {
#define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
HELPTEXT, METAVAR) \
- { NAME, HELPTEXT, METAVAR, Option::KIND##Class, FLAGS, PARAM, \
+ { NAME, HELPTEXT, METAVAR, Option::KIND##Class, PARAM, FLAGS, \
OPT_##GROUP, OPT_##ALIAS },
#include "RSCCOptions.inc"
};
diff --git a/slang.cpp b/slang.cpp
index a9fa0df..1775563 100644
--- a/slang.cpp
+++ b/slang.cpp
@@ -153,7 +153,6 @@
// Please refer to include/clang/Basic/LangOptions.h to setup
// the options.
LangOpts.RTTI = 0; // Turn off the RTTI information support
- LangOpts.NeXTRuntime = 0; // Turn off the NeXT runtime uses
LangOpts.C99 = 1;
LangOpts.Renderscript = 1;
LangOpts.CharIsSigned = 1; // Signed char is our default.
@@ -454,7 +453,10 @@
}
void Slang::setDebugMetadataEmission(bool EmitDebug) {
- CodeGenOpts.DebugInfo = EmitDebug;
+ if (EmitDebug)
+ CodeGenOpts.DebugInfo = clang::CodeGenOptions::FullDebugInfo;
+ else
+ CodeGenOpts.DebugInfo = clang::CodeGenOptions::NoDebugInfo;
}
void Slang::setOptimizationLevel(llvm::CodeGenOpt::Level OptimizationLevel) {
diff --git a/slang_rs_backend.cpp b/slang_rs_backend.cpp
index 581c3f9..2ccb2ad 100644
--- a/slang_rs_backend.cpp
+++ b/slang_rs_backend.cpp
@@ -19,6 +19,7 @@
#include <string>
#include <vector>
+#include "clang/AST/ASTContext.h"
#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/ADT/Twine.h"
@@ -28,11 +29,11 @@
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Function.h"
+#include "llvm/IRBuilder.h"
#include "llvm/Metadata.h"
#include "llvm/Module.h"
#include "llvm/Support/DebugLoc.h"
-#include "llvm/Support/IRBuilder.h"
#include "slang_assert.h"
#include "slang_rs.h"
diff --git a/slang_rs_export_foreach.cpp b/slang_rs_export_foreach.cpp
index 3b759b4..484ab46 100644
--- a/slang_rs_export_foreach.cpp
+++ b/slang_rs_export_foreach.cpp
@@ -266,7 +266,7 @@
NULL,
/* BitWidth = */ NULL,
/* Mutable = */ false,
- /* HasInit = */ false);
+ /* HasInit = */ clang::ICIS_NoInit);
RD->addDecl(FD);
RD->completeDefinition();
diff --git a/slang_rs_export_func.cpp b/slang_rs_export_func.cpp
index 6abae26..e03ccc6 100644
--- a/slang_rs_export_func.cpp
+++ b/slang_rs_export_func.cpp
@@ -98,7 +98,7 @@
NULL,
/* BitWidth = */ NULL,
/* Mutable = */ false,
- /* HasInit = */ false);
+ /* HasInit = */ clang::ICIS_NoInit);
RD->addDecl(FD);
}
diff --git a/slang_rs_export_type.cpp b/slang_rs_export_type.cpp
index 48d2288..a7b3063 100644
--- a/slang_rs_export_type.cpp
+++ b/slang_rs_export_type.cpp
@@ -19,6 +19,7 @@
#include <list>
#include <vector>
+#include "clang/AST/ASTContext.h"
#include "clang/AST/RecordLayout.h"
#include "llvm/ADT/StringExtras.h"
@@ -1381,7 +1382,7 @@
clang::DiagnosticsEngine *DiagEngine = Context->getDiagnostics();
// FIXME: All fields should be primitive type
- slangAssert((*FI)->getKind() == clang::Decl::Field);
+ slangAssert(FI->getKind() == clang::Decl::Field);
clang::FieldDecl *FD = *FI;
if (FD->isBitField()) {