[llvm-commits] [dragonegg] r104221 - /dragonegg/trunk/llvm-backend.cpp
Duncan Sands
baldrick at free.fr
Thu May 20 04:28:03 PDT 2010
Author: baldrick
Date: Thu May 20 06:28:03 2010
New Revision: 104221
URL: http://llvm.org/viewvc/llvm-project?rev=104221&view=rev
Log:
Fix exceptions-no-rtti.cpp from the clang testsuite: when
compiling with -fno-rtti -fexceptions, the initial value
was not being output for exception handling type infos.
Modified:
dragonegg/trunk/llvm-backend.cpp
Modified: dragonegg/trunk/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=104221&r1=104220&r2=104221&view=diff
==============================================================================
--- dragonegg/trunk/llvm-backend.cpp (original)
+++ dragonegg/trunk/llvm-backend.cpp Thu May 20 06:28:03 2010
@@ -1431,6 +1431,11 @@
/// make_definition_llvm - Ensures that the body or initial value of the given
/// GCC global will be output, and returns a declaration for it.
Value *make_definition_llvm(tree decl) {
+ // Inform cgraph that we used the global. Usually it knows this already, but
+ // in some cases, for example if decl is an exception handling typeinfo, it
+ // expects to be told explicitly.
+ mark_decl_referenced(decl);
+
// Only need to do something special for global variables.
if (TREE_CODE(decl) != CONST_DECL && TREE_CODE(decl) != VAR_DECL)
return DECL_LLVM(decl);
More information about the llvm-commits
mailing list