[LLVMbugs] [Bug 445] NEW: [llvmg++] not enough templates are instantiated

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Sep 27 19:15:47 PDT 2004


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=445

           Summary: [llvmg++] not enough templates are instantiated
           Product: tools
           Version: 1.3
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-g++
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org


In the testcase below (reduced from llvm-llvm) does not ever emit an
instantiation of callDefaultCtor<Pass> to the LLVM file, resulting in missing
symbols.  The #include of <string> and use of .empty() are required to trigger
this failure.

-----------

struct Pass {} ;
template<typename PassName>
Pass *callDefaultCtor() { return new PassName(); }

void foo(Pass *(*C)());

#include <string>

bool foo(std::string &X) {
  return X.empty();
}

void baz() { foo(callDefaultCtor<Pass>); }



------- 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