diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-09-10 18:51:56 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-09-10 18:51:56 +0000 |
commit | de49f360ec4780acb382a3ae923d1716fdb0dc03 (patch) | |
tree | 7a4af7e6a1aa5127e26a225a34806cdd84f7056e /lib/VMCore/AutoUpgrade.cpp | |
parent | 979927ab26a1832ee2ecd1edb17d50184756f474 (diff) |
Auto-upgrade the magic ".llvm.eh.catch.all.value" global to
"llvm.eh.catch.all.value". Only the name needs to be changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113600 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/AutoUpgrade.cpp')
-rw-r--r-- | lib/VMCore/AutoUpgrade.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/VMCore/AutoUpgrade.cpp b/lib/VMCore/AutoUpgrade.cpp index fd64460d6f..3908e8aed6 100644 --- a/lib/VMCore/AutoUpgrade.cpp +++ b/lib/VMCore/AutoUpgrade.cpp @@ -365,6 +365,20 @@ bool llvm::UpgradeIntrinsicFunction(Function *F, Function *&NewFn) { return Upgraded; } +bool llvm::UpgradeGlobalVariable(GlobalVariable *GV) { + const std::string &Name = GV->getName(); + + // We are only upgrading one symbol here. If we upgrade more, we will want to + // perform some sort of short-circuiting like in the + // "UpgradeIntrinsicFunction1" function. + if (Name == ".llvm.eh.catch.all.value") { + GV->setName("llvm.eh.catch.all.value"); + return true; + } + + return false; +} + /// ExtendNEONArgs - For NEON "long" and "wide" operations, where the results /// have vector elements twice as big as one or both source operands, do the /// sign- or zero-extension that used to be handled by intrinsics. The |