From be6f9dc855d602ed2e5f3b7bc54739b71680f512 Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Mon, 7 May 2018 16:26:20 -0500 Subject: [PATCH] Trick will not compile with llvm 6.0 and Xcode 9.2 on the mac. #579 Found a new language option we need to set in ICG when llvm >= 6.0 to parse header files correctly. The option is DoubleSquareBracketAttributes. --- trick_source/codegen/Interface_Code_Gen/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trick_source/codegen/Interface_Code_Gen/main.cpp b/trick_source/codegen/Interface_Code_Gen/main.cpp index 47716b6e..bf0cd9fb 100644 --- a/trick_source/codegen/Interface_Code_Gen/main.cpp +++ b/trick_source/codegen/Interface_Code_Gen/main.cpp @@ -97,6 +97,9 @@ int main(int argc, char * argv[]) { ci.getLangOpts().CPlusPlus = true ; ci.getLangOpts().CPlusPlus11 = true ; ci.getLangOpts().CXXOperatorNames = true ; +#if (LIBCLANG_MAJOR >= 6) + ci.getLangOpts().DoubleSquareBracketAttributes = true ; +#endif // Create all of the necessary managers. ci.createFileManager();