This is an archive of the discontinued LLVM Phabricator instance.

[Clang] - Massaging code to fix MSVS 2015 win32-release configuration
AbandonedPublic

Authored by grimar on Sep 28 2015, 1:18 AM.

Details

Reviewers
echristo
rsmith
Summary

Microsoft Visual Studio Community 2015
Version 14.0.23107.0 D14REL

When building in release mode, MSVS failed with:

57>c:\access_softek\llvm\tools\clang\lib\ast\astcontext.cpp(334): fatal error C1001: An internal error has occurred in the compiler.
57> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246)
57> To work around this problem, try simplifying or changing the program near the locations listed above.

I little code simplification helped to workaround this.

Diff Detail

Event Timeline

grimar updated this revision to Diff 35837.Sep 28 2015, 1:18 AM
grimar retitled this revision from to [Clang] - Massaging code to fix MSVS 2015 win32-release configuration.
grimar updated this object.
grimar added reviewers: rsmith, echristo.
grimar added subscribers: cfe-commits, grimar.
klimek added a subscriber: klimek.Oct 1 2015, 6:46 AM

Not sure whether it makes sense to work around compiler bugs in CL. I assume this happens with clang from trunk? Is there a bug filed against CL?

clang can't generate Visual C++ debug info except line numbers yet, so building with VC is essential to development on Windows. While most people and our bots are still using VC 2013 going forward supporting VC 2015 (even with bugs) is worth a small patch.

Not sure whether it makes sense to work around compiler bugs in CL. I assume this happens with clang from trunk? Is there a bug filed against CL?

We do this with some regularity for MSVC and GCC.

ASTContext.cpp
367–374

We need a comment detailing that this is a workaround for MSVC 2015 so that it can be removed when we drop support for 2015.

grimar updated this revision to Diff 36271.Oct 1 2015, 10:50 AM

Added comment per review request.

klimek added a comment.Oct 5 2015, 4:39 AM

Note: with VS Professional 14.0.23107.0 D14REL I do not get this error.

grimar abandoned this revision.Oct 27 2015, 10:27 AM

r251415 fixes this in another way.