[llvm-commits] [llvm-gcc-4.2] r55633 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp

Duncan Sands baldrick at free.fr
Tue Sep 2 07:23:42 PDT 2008


Author: baldrick
Date: Tue Sep  2 09:23:41 2008
New Revision: 55633

URL: http://llvm.org/viewvc/llvm-project?rev=55633&view=rev
Log:
Sanity check that gcc's notion of endianness
coincides with ours.

Modified:
    llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp

Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=55633&r1=55632&r2=55633&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Tue Sep  2 09:23:41 2008
@@ -209,6 +209,8 @@
   FeatureStr = Features.getString();
 #endif
   TheTarget = TME->CtorFn(*TheModule, FeatureStr);
+  assert(TheTarget->getTargetData()->isBigEndian() == BYTES_BIG_ENDIAN);
+
   TheFolder = new TargetFolder(*TheTarget->getTargetData());
 
   // Install information about target datalayout stuff into the module for





More information about the llvm-commits mailing list