Fix the IntegersSubsetTest unit test when compiled with gcc-4.7. The issue here
authorDuncan Sands <baldrick@free.fr>
Sat, 3 Nov 2012 14:04:04 +0000 (14:04 +0000)
committerDuncan Sands <baldrick@free.fr>
Sat, 3 Nov 2012 14:04:04 +0000 (14:04 +0000)
commit4698cb339faf511b7d225376b177fd243cdfe85b
tree67685cc45eb78c30954387989ba8f7ac9c5f9649
parentba15a7974a54f399fe97c02799af955f52198a67
Fix the IntegersSubsetTest unit test when compiled with gcc-4.7.  The issue here
is that the unit test doesn't have IntTy equal to APInt, instead it uses a class
derived from APInt.  When, as in these lines, an IntTy& reference is returned
but is assigned to an APInt&, the compiler destroys the temporary the IntTy& was
referring to, leaving the APInt& referring to garbage.  This causes the unittest
to fail systematically on my machine; it can also be caught by running the test
under valgrind.

llvm-svn: 167356
llvm/include/llvm/Support/IntegersSubset.h