[LLVMbugs] [Bug 1206] NEW: llvm::Module::getDataLayout() returns an incorrect layout.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Feb 17 11:23:28 PST 2007


           Summary: llvm::Module::getDataLayout() returns an incorrect
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: chuckbob17 at earthlink.net

I'm using the LLVM 1.9 API.   I have an LLVM IR file (in ASCII) that contains
the following header:

; ModuleID = 'hello.c'
target datalayout = "e-p:32:32"
target endian = little
target pointersize = 32
target triple = "i686-pc-linux-gnu"

I then have some code that reads in the IR file and queries for the data layout:

llvm::Module* mod = llvm::ParseAssemblyFile("file.ll");
std::string layout = llvm::Module::getDataLayout();
std::cout << layout;

The value I get back from getDataLayout() is "e-p:32:32-e-p:32:32".   I think it
should return "e-p:32:32" instead.

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