Fix ARM ABI issues for RenderScript.
Bug: http://b/26987366
Although I did upstream a working patch for our ARM ABI vector problems,
the patch is insufficient for RenderScript, as it is *NOT* an Android
target. It is a generic Linux target, so we need to also check our
LanguageOptions to see if we should use the alternate vector ABI.
(cherry picked from commit 3bd7be39de21405059e7a7ac22d97dc80cecdf8e)
Change-Id: Ifaccd3f1617a86ebcdc6c9310c62cae9279ddde8
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 84ffef0..9457b68 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -4773,7 +4773,7 @@
bool isAndroid() const {
return (getTarget().getTriple().getEnvironment() ==
- llvm::Triple::Android);
+ llvm::Triple::Android || getContext().getLangOpts().Renderscript);
}
ABIKind getABIKind() const { return Kind; }