[LLVMbugs] [Bug 2712] New: Hello, World in `Writing an LLVM Pass' does not work

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Aug 23 00:33:01 PDT 2008


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

           Summary: Hello, World in `Writing an LLVM Pass' does not work
           Product: Documentation
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: General docs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: haohui.mai at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Running the Hello, World example in `Writing an LLVM Pass' results the
following error:

$ opt -load Hello.dylib 
Assertion failed: (Inserted && "Pass registered multiple times!"), function
RegisterPass, file Pass.cpp, line 149.

Abort trap

Debugging the system shows that the module printm actually loads twice: one
occurs in the opt binary and the other one occurs when loading the Hello.dylib.
In fact, the latter registration is caused by the linking LLVMCore into the
Hello.dylib.

Solution:

Removing the dependency of LLVMCore from the Makefile solves the problem.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list