summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorStephan Tolksdorf <st@quanttec.com>2014-03-15 10:23:27 +0000
committerStephan Tolksdorf <st@quanttec.com>2014-03-15 10:23:27 +0000
commite96f8b3774a873e27056c5e98d26dedfb93530cf (patch)
treea6b1059d4ee41d1b5fb0a3650add6d7c8b00a525 /llvm/lib/CodeGen/MachineInstr.cpp
parent8cef8867eee4846a75a83152e6fe16ad4c5e7c99 (diff)
downloadbcm5719-llvm-e96f8b3774a873e27056c5e98d26dedfb93530cf.tar.gz
bcm5719-llvm-e96f8b3774a873e27056c5e98d26dedfb93530cf.zip
Fix PR18806: Canonicalize the replacement type when deserializing a SubstTemplateTypeParmType
What's going on in the test case (without the patch applied) is this: When the header is parsed, decltype(B()) is canonicalized to decltype(Y()), because that was the first parsed equivalent decltype expression. Hence, the TemplateSpecializationType for Id<decltype(B())> ends up with SubstTemplateTypeParmType(T, decltype(Y())) as the AliasedType member. When the PCH file is included and the AST reader reads Id<decltype(B())>, it sees decltype(B()) before decltype(Y()). So, this time decltype(B()) ends up being the canonical type for both decltypes, which leads to an assert violation when the reader calls getSubstTemplateTypeParmType with the non-canonical decltype(Y()) as the replacement type. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits, aemerson Differential Revision: http://llvm-reviews.chandlerc.com/D3073 llvm-svn: 204005
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud