mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-24 08:18:33 +00:00
Simplify and rename function overrideFunctionAttributes. NFC.
This is in preparation to making changes needed to stop resetting NoFramePointerElim in resetTargetOptions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238079 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -287,15 +287,4 @@ static inline std::string getFeaturesStr() {
|
||||
return Features.getString();
|
||||
}
|
||||
|
||||
static inline void overrideFunctionAttributes(StringRef CPU, StringRef Features,
|
||||
Module &M) {
|
||||
for (auto &F : M) {
|
||||
if (!CPU.empty())
|
||||
llvm::overrideFunctionAttribute("target-cpu", CPU, F);
|
||||
|
||||
if (!Features.empty())
|
||||
llvm::overrideFunctionAttribute("target-features", Features, F);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -591,9 +591,6 @@ ilist_traits<Argument>::getSymTab(Function *F) {
|
||||
return F ? &F->getValueSymbolTable() : nullptr;
|
||||
}
|
||||
|
||||
/// \brief Overwrite attribute Kind in function F.
|
||||
void overrideFunctionAttribute(StringRef Kind, StringRef Value, Function &F);
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
#endif
|
||||
|
||||
@@ -222,6 +222,10 @@ namespace llvm {
|
||||
MCTargetOptions MCOptions;
|
||||
};
|
||||
|
||||
/// \brief Set function attributes of functions in Module M based on CPU and
|
||||
/// Features.
|
||||
void setFunctionAttributes(StringRef CPU, StringRef Features, Module &M);
|
||||
|
||||
// Comparison operators:
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user