aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Wang <xi.wang@gmail.com>2013-05-21 04:05:21 -0400
committerPekka Enberg <penberg@kernel.org>2013-05-21 12:21:09 +0300
commit469e5d6ea3353fb3039747f52fb506c9ba983d8b (patch)
tree672fd539828d3b49a0b621cfedcf35206f811492
parent317876877c7c818c5cfd69da7bb45174b6ddadd4 (diff)
downloadsparse-469e5d6ea3353fb3039747f52fb506c9ba983d8b.tar.gz
sparse, llvm: die if error
Stop code generation if anything is wrong in front-end. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r--sparse-llvm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sparse-llvm.c b/sparse-llvm.c
index 92f1d0e7..72192900 100644
--- a/sparse-llvm.c
+++ b/sparse-llvm.c
@@ -1146,7 +1146,10 @@ int main(int argc, char **argv)
/* need ->phi_users */
dbg_dead = 1;
FOR_EACH_PTR_NOTAG(filelist, file) {
- compile(module, sparse(file));
+ symlist = sparse(file);
+ if (die_if_error)
+ return 1;
+ compile(module, symlist);
} END_FOR_EACH_PTR_NOTAG(file);
LLVMVerifyModule(module, LLVMPrintMessageAction, NULL);