[llvm-commits] [llvm-gcc-4.0] r45447 - /llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp

Gordon Henriksen gordonhenriksen at mac.com
Sat Dec 29 22:03:23 PST 2007


Author: gordon
Date: Sun Dec 30 00:03:23 2007
New Revision: 45447

URL: http://llvm.org/viewvc/llvm-project?rev=45447&view=rev
Log:
Fix up llvm-gcc translation for GC roots.

Modified:
    llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp?rev=45447&r1=45446&r2=45447&view=diff

==============================================================================
--- llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Sun Dec 30 00:03:23 2007
@@ -1452,6 +1452,8 @@
 
 // Emits code to do something for a type attribute
 void TreeToLLVM::EmitTypeGcroot(Value *V, tree decl) {
+  // GC intrinsics can only be used in functions which specify a collector.
+  Fn->setCollector("shadow-stack");
 
   Function *gcrootFun = Intrinsic::getDeclaration(TheModule,
 						  Intrinsic::gcroot);





More information about the llvm-commits mailing list