[llvm-commits] [llvm] r107658 - /llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp

Anton Korobeynikov asl at math.spbu.ru
Tue Jul 6 08:24:56 PDT 2010


Author: asl
Date: Tue Jul  6 10:24:56 2010
New Revision: 107658

URL: http://llvm.org/viewvc/llvm-project?rev=107658&view=rev
Log:
Fix a major regression on COFF targets introduced by r103267: 'discardable' section means that it is used only during the program load and can be discarded afterwards.
This way *only* debug sections can be discarded, but not the opposite. Seems like the copy-and-pasto from ELF code, since there it contains the reverse flag ('alloc').

Modified:
    llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp

Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=107658&r1=107657&r2=107658&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Tue Jul  6 10:24:56 2010
@@ -936,7 +936,7 @@
 getCOFFSectionFlags(SectionKind K) {
   unsigned Flags = 0;
 
-  if (!K.isMetadata())
+  if (K.isMetadata())
     Flags |=
       COFF::IMAGE_SCN_MEM_DISCARDABLE;
   else if (K.isText())





More information about the llvm-commits mailing list