[llvm-commits] [llvm-gcc-4.2] r101199 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Bill Wendling
isanbard at gmail.com
Tue Apr 13 18:10:28 PDT 2010
Author: void
Date: Tue Apr 13 20:10:27 2010
New Revision: 101199
URL: http://llvm.org/viewvc/llvm-project?rev=101199&view=rev
Log:
Give .llvm.eh.catch.all.value private linkage so that it goes away after
linking.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=101199&r1=101198&r2=101199&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue Apr 13 20:10:27 2010
@@ -2069,6 +2069,8 @@
std::vector<Value*> Args;
std::vector<struct eh_region *> Handlers;
+ static Value *CatchAll = 0;
+
for (unsigned i = 1; i < LandingPads.size(); ++i) {
BasicBlock *LandingPad = LandingPads[i];
@@ -2096,8 +2098,6 @@
foreach_reachable_handler(i, false, AddHandler, &Handlers);
bool HasCleanup = false;
- static Value *CatchAll = 0;
-
for (std::vector<struct eh_region *>::iterator I = Handlers.begin(),
E = Handlers.end(); I != E; ++I) {
struct eh_region *region = *I;
@@ -2129,7 +2129,7 @@
Constant::getNullValue(Type::getInt8PtrTy(Context));
CatchAll = new GlobalVariable(*TheModule, Init->getType(), true,
- GlobalVariable::LinkOnceAnyLinkage,
+ GlobalVariable::PrivateLinkage,
Init, ".llvm.eh.catch.all.value");
}
@@ -2171,7 +2171,7 @@
Init = cast<Constant>(Emit(catch_all_type, 0));
CatchAll = new GlobalVariable(*TheModule, Init->getType(), true,
- GlobalVariable::LinkOnceAnyLinkage,
+ GlobalVariable::PrivateLinkage,
Init, ".llvm.eh.catch.all.value");
}
More information about the llvm-commits
mailing list