[llvm-bugs] [Bug 27445] Assertion failed: Layout && "Unable to find record layout information for type" due to PCH re-entrancy into CodeGen

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Apr 22 11:15:36 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27445

Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |rnk at google.com
         Resolution|WONTFIX                     |---
            Summary|Regression(266932:266938):  |Assertion failed: Layout &&
                   |Assertion failed: Layout && |"Unable to find record
                   |"Unable to find record      |layout information for
                   |layout information for      |type" due to PCH
                   |type" when building         |re-entrancy into CodeGen
                   |chromium with clang-cl      |

--- Comment #6 from Reid Kleckner <rnk at google.com> ---
Nico's reproduction:

Standalone:

C:\src\chrome\src>type header.h
namespace std {
struct type_info {
  size_t hash_code() const { return 0; }
  virtual ~type_info();
};
}

C:\src\chrome\src>type empty.cc

C:\src\chrome\src>type repro.cc
class Params;
struct __declspec(dllexport) Visitor {
  void OnReceiveConnectionState(const Params& params) {}
};
class __declspec(dllexport) Params {
  void operator=(const Params&);
  void (*on_arena_allocation)(const std::type_info* allocated_type);
  int field() const { return field_; }
  int field_;
};

C:\src\chrome\src>..\..\llvm-build-relsym\bin\clang-cl /c empty.cc /FIheader.h
/Ycheader.h -fmsc-version=1900 /Fpfoo.pch
C:\src\chrome\src>..\..\llvm-build-relsym\bin\clang-cl /c repro.cc /FIheader.h
/Yuheader.h -fmsc-version=1900 /Fpfoo.pch

Assertion failed: Layout && "Unable to find record layout information for
type", file C:\src\llvm-rw\tools\clang\lib\CodeGen\CodeGenTypes.cpp, line 734

We should be able to fix this by putting in a HandlingTopLevelDeclRAII object
in HandleTagDeclDefinition.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160422/5f66c722/attachment.html>


More information about the llvm-bugs mailing list