Temporary fix to get rid of gcc warning.
authorPatrik Hagglund <patrik.h.hagglund@ericsson.com>
Wed, 29 May 2013 07:32:08 +0000 (07:32 +0000)
committerPatrik Hagglund <patrik.h.hagglund@ericsson.com>
Wed, 29 May 2013 07:32:08 +0000 (07:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182832 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/AMDGPUSubtarget.cpp

index 6bfe17bbae9728a46a43ce68c895624ade32c417..da342892da5b73847b0b358d4748ff6c1a3b4ac3 100644 (file)
@@ -37,7 +37,16 @@ AMDGPUSubtarget::AMDGPUSubtarget(StringRef TT, StringRef CPU, StringRef FS) :
   ParseSubtargetFeatures(GPU, FS);
   DevName = GPU;
   Device = AMDGPUDeviceInfo::getDeviceFromName(DevName, this, Is64bit);
-  TexVTXClauseSize = (Device->getGeneration() >= AMDGPUDeviceInfo::HD4XXX)?16:8;
+
+  // FIXME: The code in the comment below was the original code. But the
+  // condition is always true, generating a warning when compiled with
+  // gcc. Vincent Lejeune indicated in a mail to llvm-commits 2013-05-23 that he
+  // will look into this. The code 'TexVTXClauseSize = 16' is just a temporary
+  // equivalent replacement, to get rid of the compiler warning.
+
+  // TexVTXClauseSize = (Device->getGeneration() >= AMDGPUDeviceInfo::HD4XXX)?16:8;
+
+  TexVTXClauseSize = 16;
 }
 
 AMDGPUSubtarget::~AMDGPUSubtarget() {