support more recent LLVMs
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 10 Nov 2011 18:47:04 +0000 (19:47 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 13 Nov 2011 14:45:23 +0000 (15:45 +0100)
In particular, getHostTriple has been renamed to getDefaultTargetTriple.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
configure.ac
interface/extract_interface.cc

index 3a84e71..e16a0fb 100644 (file)
@@ -123,6 +123,9 @@ system)
        AC_LANG_PUSH(C++)
        AC_CHECK_HEADER([clang/Basic/SourceLocation.h], [],
                [AC_ERROR([clang header file not found])])
+       AC_EGREP_HEADER([getDefaultTargetTriple], [llvm/Support/Host.h], [],
+               [AC_DEFINE([getDefaultTargetTriple], [getHostTriple],
+               [Define to getHostTriple for older versions of clang])])
        AC_EGREP_HEADER([getExpansionLineNumber],
                [clang/Basic/SourceLocation.h], [],
                [AC_DEFINE([getExpansionLineNumber],
index 7b25a77..89baf81 100644 (file)
@@ -140,7 +140,7 @@ int main(int argc, char *argv[])
        Clang->createFileManager();
        Clang->createSourceManager(Clang->getFileManager());
        TargetOptions TO;
-       TO.Triple = llvm::sys::getHostTriple();
+       TO.Triple = llvm::sys::getDefaultTargetTriple();
        TargetInfo *target = TargetInfo::CreateTargetInfo(Diags, TO);
        Clang->setTarget(target);
        CompilerInvocation::setLangDefaults(Clang->getLangOpts(), IK_C,