summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/TargetInfo.cpp
diff options
context:
space:
mode:
authorJonas Hahnfeld <hahnjo@hahnjo.de>2017-11-18 21:00:46 +0000
committerJonas Hahnfeld <hahnjo@hahnjo.de>2017-11-18 21:00:46 +0000
commit87d44269885f100a2a039e628919a34748a720e5 (patch)
tree2722ddd24350ed7b874e1c49f90dd80380b92787 /clang/lib/Basic/TargetInfo.cpp
parent9b1dc4c2756dc25f38caa0cf6e6b71d70295b2d1 (diff)
downloadbcm5719-llvm-87d44269885f100a2a039e628919a34748a720e5.tar.gz
bcm5719-llvm-87d44269885f100a2a039e628919a34748a720e5.zip
[OpenMP] Show error if VLAs are not supported
Some target devices (e.g. Nvidia GPUs) don't support dynamic stack allocation and hence no VLAs. Print errors with description instead of failing in the backend or generating code that doesn't work. This patch handles explicit uses of VLAs (local variable in target or declare target region) or implicitly generated (private) VLAs for reductions on VLAs or on array sections with non-constant size. Differential Revision: https://reviews.llvm.org/D39505 llvm-svn: 318601
Diffstat (limited to 'clang/lib/Basic/TargetInfo.cpp')
-rw-r--r--clang/lib/Basic/TargetInfo.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp
index 9ae466b7869..c58ed1e300e 100644
--- a/clang/lib/Basic/TargetInfo.cpp
+++ b/clang/lib/Basic/TargetInfo.cpp
@@ -31,6 +31,7 @@ TargetInfo::TargetInfo(const llvm::Triple &T) : TargetOpts(), Triple(T) {
// SPARC. These should be overridden by concrete targets as needed.
BigEndian = !T.isLittleEndian();
TLSSupported = true;
+ VLASupported = true;
NoAsmVariants = false;
HasFloat128 = false;
PointerWidth = PointerAlign = 32;
OpenPOWER on IntegriCloud