summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-12-13 18:58:59 +0000
committerChris Lattner <sabre@nondot.org>2008-12-13 18:58:59 +0000
commite69336c22d289f8e902ef87b13603fb264e868d0 (patch)
tree4a797a906352e7d392a452df877208bbe60e9db9 /clang
parentd923519cc552bbfe31c60843e8fcda4bce529276 (diff)
downloadbcm5719-llvm-e69336c22d289f8e902ef87b13603fb264e868d0.tar.gz
bcm5719-llvm-e69336c22d289f8e902ef87b13603fb264e868d0.zip
disable Anders' recent VLA patch, this fixes PR3209.
llvm-svn: 60989
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp9
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp4
2 files changed, 11 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 62684bae496..1c72ba12280 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -160,6 +160,15 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
D.getStorageClass() == VarDecl::Register ? ".reg." : ".auto.";
DeclPtr = GenerateStaticBlockVarDecl(D, true, Class);
}
+ } else if (1) {
+ // FIXME: The code below is disabled because is causes a regression in the
+ // testsuite.
+ CGM.ErrorUnsupported(&D, "variable-length array");
+
+ const llvm::Type *LTy = ConvertType(Ty);
+ llvm::AllocaInst *Alloc =
+ CreateTempAlloca(LTy, D.getIdentifier()->getName());
+ DeclPtr = Alloc;
} else {
const VariableArrayType *VAT = getContext().getAsVariableArrayType(Ty);
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index 857a40e6c8d..ffb51647826 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -667,8 +667,8 @@ ScalarExprEmitter::VisitSizeOfAlignOfExpr(const SizeOfAlignOfExpr *E) {
CGF.getContext().getAsVariableArrayType(TypeToSize)) {
if (E->isSizeOf())
return CGF.GetVLASize(VAT);
- else
- assert(0 && "alignof VLAs not implemented yet");
+ // FIXME: This should be an UNSUPPORTED error.
+ assert(0 && "alignof VLAs not implemented yet");
}
std::pair<uint64_t, unsigned> Info = CGF.getContext().getTypeInfo(TypeToSize);
OpenPOWER on IntegriCloud