llvm.org GIT mirror llvm / 19a5003
Merge AutoUpgrade of EH magic variable. $ svn merge -c 113600 https://llvm.org/svn/llvm-project/llvm/trunk --- Merging r113600 into '.': A test/Bitcode/AutoUpgradeGlobals.ll A test/Bitcode/AutoUpgradeGlobals.ll.bc U include/llvm/AutoUpgrade.h U lib/Bitcode/Reader/BitcodeReader.cpp U lib/VMCore/AutoUpgrade.cpp $ svn merge -c 113603 https://llvm.org/svn/llvm-project/llvm/trunk --- Merging r113603 into '.': G lib/VMCore/AutoUpgrade.cpp $ svn merge -c 113615 https://llvm.org/svn/llvm-project/llvm/trunk --- Merging r113615 into '.': G lib/VMCore/AutoUpgrade.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_28@114020 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 9 years ago
5 changed file(s) with 26 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1515
1616 namespace llvm {
1717 class Module;
18 class GlobalVariable;
1819 class Function;
1920 class CallInst;
2021
3435 /// so that it can update all calls to the old function.
3536 void UpgradeCallsToIntrinsic(Function* F);
3637
38 /// This checks for global variables which should be upgraded. It returns true
39 /// if it requires upgrading.
40 bool UpgradeGlobalVariable(GlobalVariable *GV);
41
3742 /// This function checks debug info intrinsics. If an intrinsic is invalid
3843 /// then this function simply removes the intrinsic.
3944 void CheckDebugInfoIntrinsics(Module *M);
12951295 if (UpgradeIntrinsicFunction(FI, NewFn))
12961296 UpgradedIntrinsics.push_back(std::make_pair(FI, NewFn));
12971297 }
1298
1299 // Look for global variables which need to be renamed.
1300 for (Module::global_iterator
1301 GI = TheModule->global_begin(), GE = TheModule->global_end();
1302 GI != GE; ++GI)
1303 UpgradeGlobalVariable(GI);
12981304
12991305 // Force deallocation of memory for these vectors to favor the client that
13001306 // want lazy deserialization.
362362 if (unsigned id = F->getIntrinsicID())
363363 F->setAttributes(Intrinsic::getAttributes((Intrinsic::ID)id));
364364 return Upgraded;
365 }
366
367 bool llvm::UpgradeGlobalVariable(GlobalVariable *GV) {
368 StringRef Name(GV->getName());
369
370 // We are only upgrading one symbol here.
371 if (Name == ".llvm.eh.catch.all.value") {
372 GV->setName("llvm.eh.catch.all.value");
373 return true;
374 }
375
376 return false;
365377 }
366378
367379 /// ExtendNEONArgs - For NEON "long" and "wide" operations, where the results
0 ; This isn't really an assembly file. It just runs test on bitcode to ensure
1 ; it is auto-upgraded.
2 ; RUN: llvm-dis < %s.bc | not grep {i32 @\\.llvm\\.eh}