Do not mark EH tables no-dead-strip unless the

associated function is so marked.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46088 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dale Johannesen
2008-01-16 19:59:28 +00:00
parent b8b92216f1
commit 48ae02fe62
3 changed files with 50 additions and 13 deletions

View File

@@ -35,6 +35,7 @@
#include "llvm/Support/DataTypes.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/UniqueVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/GlobalValue.h"
#include "llvm/Pass.h"
@@ -1037,6 +1038,10 @@ private:
// common EH frames.
std::vector<Function *> Personalities;
// UsedFunctions - the functions in the llvm.used list in a more easily
// searchable format.
SmallPtrSet<const Function *, 32> UsedFunctions;
bool CallsEHReturn;
bool CallsUnwindInit;
public:
@@ -1235,6 +1240,11 @@ public:
return Personalities;
}
// UsedFunctions - Return set of the functions in the llvm.used list.
const SmallPtrSet<const Function *, 32>& getUsedFunctions() const {
return UsedFunctions;
}
/// addCatchTypeInfo - Provide the catch typeinfo for a landing pad.
///
void addCatchTypeInfo(MachineBasicBlock *LandingPad,