llvm-mirror/lib/AsmParser
Chris Lattner 2db6dc1753 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
2009-03-09 04:49:14 +00:00
..
CMakeLists.txt update the cmakefile. This is a "best guess", I haven't tested this. 2009-01-02 07:14:23 +00:00
LLLexer.cpp Introduce new linkage types linkonce_odr, weak_odr, common_odr 2009-03-07 15:45:40 +00:00
LLLexer.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
LLParser.cpp Fix two classes of bugs. First: 2009-03-09 04:49:14 +00:00
LLParser.h Fix two classes of bugs. First: 2009-03-09 04:49:14 +00:00
LLToken.h Introduce new linkage types linkonce_odr, weak_odr, common_odr 2009-03-07 15:45:40 +00:00
Makefile Removed trailing whitespace from Makefiles. 2009-01-09 16:44:42 +00:00
Parser.cpp Fix the path to llvm/Assembly/Parser.h in a comment. 2009-01-08 22:17:05 +00:00