Message ID | 1345337422-22094-1-git-send-email-j.neuschaefer@gmx.net (mailing list archive) |
---|---|
State | Mainlined, archived |
Headers | show |
On Sun, Aug 19, 2012 at 3:50 AM, Jonathan Neuschäfer <j.neuschaefer@gmx.net> wrote: > In later versions sparse-llvm should stop on wrong llvm code, instead > of outputting it, but for now there are too many warnings being produced > for this to be feasible (I think). > > Cc: Pekka Enberg <penberg@kernel.org> > Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Applied to 'llvm/core' branch: https://github.com/penberg/sparse-llvm/commits/llvm/core Thanks! -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/sparse-llvm.c b/sparse-llvm.c index 5bcc758..e02e212 100644 --- a/sparse-llvm.c +++ b/sparse-llvm.c @@ -5,6 +5,7 @@ #include <llvm-c/Core.h> #include <llvm-c/BitWriter.h> +#include <llvm-c/Analysis.h> #include <stdbool.h> #include <stdio.h> @@ -1253,6 +1254,8 @@ int main(int argc, char **argv) compile(module, sparse(file)); } END_FOR_EACH_PTR_NOTAG(file); + LLVMVerifyModule(module, LLVMPrintMessageAction, NULL); + LLVMWriteBitcodeToFD(module, STDOUT_FILENO, 0, 0); LLVMDisposeModule(module);
In later versions sparse-llvm should stop on wrong llvm code, instead of outputting it, but for now there are too many warnings being produced for this to be feasible (I think). Cc: Pekka Enberg <penberg@kernel.org> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> --- sparse-llvm.c | 3 +++ 1 file changed, 3 insertions(+)