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 | e26fffc597002c5fcc8e352a5886253da5c9fe7e (patch) | |
tree | 025131db25b38e0ef19daffa2be5513b5982e5b3 /llvm/lib/VMCore/AutoUpgrade.cpp | |
parent | 099600312607567b3f24efbfb9de3b825fd5704e (diff) | |
download | bcm5719-llvm-e26fffc597002c5fcc8e352a5886253da5c9fe7e.tar.gz bcm5719-llvm-e26fffc597002c5fcc8e352a5886253da5c9fe7e.zip |
Auto-upgrade the magic ".llvm.eh.catch.all.value" global to
"llvm.eh.catch.all.value". Only the name needs to be changed.
llvm-svn: 113600
Diffstat (limited to 'llvm/lib/VMCore/AutoUpgrade.cpp')
-rw-r--r-- | llvm/lib/VMCore/AutoUpgrade.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/AutoUpgrade.cpp b/llvm/lib/VMCore/AutoUpgrade.cpp index fd64460d6fd..3908e8aed68 100644 --- a/llvm/lib/VMCore/AutoUpgrade.cpp +++ b/llvm/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 |