[LLVMbugs] [Bug 895] NEW: asmparser doesn't handle undeclared function very well

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Sep 2 07:36:04 PDT 2006


http://llvm.org/bugs/show_bug.cgi?id=895

           Summary: asmparser doesn't handle undeclared function very well
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: LLVM assembly language parser
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca


This llvm asm file:

  void %foo() { 
    call void %bar();
    ret void;
  }

is missing the definition of function bar. Running llvm-as produces this mess:
$ llvm-as < foo.l
Leaked LLVM objects found: after running pass 'Immediate Dominators Construction':
        void ()* <badref>


This is probably because you removed an object, but didn't delete it.  Please
check your code for memory leaks.
llvm-as: assembly parsed, but does not verify as correct!
Referring to an argument in another function!
        call void <badref>( )
Broken module found, compilation terminated.
Broken module found, compilation terminated.

Which is helpful enough to point to the problem, but not as much as:
llvm-as: <stdin>:2,0: Reference to an undefined function: 'bar'

for example.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list