diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-09 04:49:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-09 04:49:14 +0000 |
commit | f880ca2a31c8ac4287230d890b97260063e1e599 (patch) | |
tree | 69e8119e10d2bbbae5ea1ea279027e0f1e3ae931 /llvm/lib/Analysis/DebugInfo.cpp | |
parent | 6090a42fe5d37187fd31a62712490ce467bdbc23 (diff) | |
download | bcm5719-llvm-f880ca2a31c8ac4287230d890b97260063e1e599.tar.gz bcm5719-llvm-f880ca2a31c8ac4287230d890b97260063e1e599.zip |
Fix two classes of bugs. First:
validate an invariant so that the asmparser rejects a bad construct
instead of the verifier. Before:
llvm-as: assembly parsed, but does not verify as correct!
Invalid struct return type!
i64 (%struct.Type*, %struct.Type*)* @foo
after:
llvm-as: t.ll:5:8: functions with 'sret' argument must return void
define i64 @foo(%struct.Type* noalias nocapture sret %agg.result, %struct.Type* nocapture byval %t) nounwind {
^
Second, check that void is only used where allowed (in function return types) not in
arbitrary places, fixing PR3747 - Crash in llvm-as with void field in struct. We
now reject that example with:
$ llvm-as t.ll
llvm-as: t.ll:1:12: struct element can not have void type
%x = type {void}
^
llvm-svn: 66394
Diffstat (limited to 'llvm/lib/Analysis/DebugInfo.cpp')
0 files changed, 0 insertions, 0 deletions