[llvm-commits] [dragonegg] r150473 - /dragonegg/trunk/src/Backend.cpp
Duncan Sands
baldrick at free.fr
Tue Feb 14 03:43:16 PST 2012
Author: baldrick
Date: Tue Feb 14 05:43:16 2012
New Revision: 150473
URL: http://llvm.org/viewvc/llvm-project?rev=150473&view=rev
Log:
This subroutine is only used when assertions are enabled.
Modified:
dragonegg/trunk/src/Backend.cpp
Modified: dragonegg/trunk/src/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Backend.cpp?rev=150473&r1=150472&r2=150473&view=diff
==============================================================================
--- dragonegg/trunk/src/Backend.cpp (original)
+++ dragonegg/trunk/src/Backend.cpp Tue Feb 14 05:43:16 2012
@@ -242,11 +242,11 @@
return optimize;
}
+#ifndef NDEBUG
// SizeOfGlobalMatchesDecl - Whether the size of the given global value is the
// same as that of the given GCC declaration. Conservatively returns 'true' if
// the answer is unclear.
-static LLVM_ATTRIBUTE_UNUSED // Only called from asserts.
-bool SizeOfGlobalMatchesDecl(GlobalValue *GV, tree decl) {
+static bool SizeOfGlobalMatchesDecl(GlobalValue *GV, tree decl) {
// If the GCC declaration has no size then nothing useful can be said here.
if (!DECL_SIZE(decl))
return true;
@@ -267,6 +267,7 @@
return TheTarget->getTargetData()->getTypeAllocSizeInBits(Ty) ==
((gcc_size + Align - 1) / Align) * Align;
}
+#endif
#ifndef LLVM_TARGET_NAME
#error LLVM_TARGET_NAME macro not specified
More information about the llvm-commits
mailing list