[llvm-commits] [llvm-gcc-4.0] r41279 - /llvm-gcc-4.0/trunk/gcc/llvm-backend.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Wed Aug 22 10:22:11 PDT 2007
Author: alenhar2
Date: Wed Aug 22 12:22:11 2007
New Revision: 41279
URL: http://llvm.org/viewvc/llvm-project?rev=41279&view=rev
Log:
fix PR1586
Modified:
llvm-gcc-4.0/trunk/gcc/llvm-backend.cpp
Modified: llvm-gcc-4.0/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-backend.cpp?rev=41279&r1=41278&r2=41279&view=diff
==============================================================================
--- llvm-gcc-4.0/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.0/trunk/gcc/llvm-backend.cpp Wed Aug 22 12:22:11 2007
@@ -483,8 +483,10 @@
const Type *SBP = PointerType::get(Type::Int8Ty);
ArrayType *AT = ArrayType::get(SBP, AttributeUsedGlobals.size());
Constant *Init = ConstantArray::get(AT, AttributeUsedGlobals);
- new GlobalVariable(AT, false, GlobalValue::AppendingLinkage, Init,
+ GlobalValue* gv = new GlobalVariable(AT, false,
+ GlobalValue::AppendingLinkage, Init,
"llvm.used", TheModule);
+ gv->setSection("llvm.metadata");
AttributeUsedGlobals.clear();
}
More information about the llvm-commits
mailing list