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

            Bug ID: 15341
           Summary: Codegen creates two distinct types for same Clang type
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

When using CodeGenModule class to code generate a module, GetAddrOfGlobal is
used to ensure that a global variable is actually saved and created in the
module. Then the module is released and linked into a second module.

Given

VarDecl* vd = ...

which is a global variable, then

codegen.getTypes().ConvertType(vd->getType());

is not the same LLVM type as

module.getGlobalVariable(codegen.MangleName(vd));

after indirection has been accounted for. Clang creates identical named and
unnamed LLVM type. This is after CodeGenModule::Release() has been called. The
test I have been working with is simply std::cout in <iostream>. This causes
spurious LLVM type errors. I am using Windows 7 x64, VS 2012, targetting MinGW
and using libstdc++ 4.6.3, and Clang is r175973.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to