diff options
-rw-r--r-- | lib/Target/JSBackend/SimplifyAllocas.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/JSBackend/SimplifyAllocas.cpp b/lib/Target/JSBackend/SimplifyAllocas.cpp index 2fda6be948..fb6d65cd4b 100644 --- a/lib/Target/JSBackend/SimplifyAllocas.cpp +++ b/lib/Target/JSBackend/SimplifyAllocas.cpp @@ -88,7 +88,7 @@ bool SimplifyAllocas::runOnFunction(Function &Func) { } if (!Fail) Aliases.push_back(U); } - if (!Fail && Aliases.size() > 0) { + if (!Fail && Aliases.size() > 0 && ActualType) { // success, replace the alloca and the bitcast aliases with a single simple alloca AllocaInst *NA = new AllocaInst(ActualType, ConstantInt::get(i32, 1), "", I); NA->takeName(AI); |