Let llc and opt override "-target-cpu" and "-target-features" via command line

options.

This commit fixes a bug in llc and opt where "-mcpu" and "-mattr" wouldn't
override function attributes "-target-cpu" and "-target-features" in the IR.

Differential Revision: http://reviews.llvm.org/D9537


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236677 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Akira Hatanaka
2015-05-06 23:54:14 +00:00
parent d9fd44e97a
commit e6f0494cd8
8 changed files with 71 additions and 5 deletions

View File

@@ -584,6 +584,9 @@ 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