diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-02-26 23:18:33 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-02-26 23:18:33 +0000 |
commit | d9365d2d71d591024c420b52afdfc8b4ed0c55db (patch) | |
tree | cc6392c1928eae9382b898a7d014f89d99abe37f | |
parent | c3af6799d4c8ec4b338236e4361c0795e9af890a (diff) |
Temporarily revert r176133 until testcases are modified.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176137 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 3bcf7d0f50..33b0475c56 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -1021,6 +1021,19 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, // Attributes that should go on the call site only. if (!CodeGenOpts.SimplifyLibCalls) FuncAttrs.addAttribute(llvm::Attribute::NoBuiltin); + } else { + // Attributes that should go on the function, but not the call site. + if (!TargetOpts.CPU.empty()) + FuncAttrs.addAttribute("target-cpu", TargetOpts.CPU); + + if (TargetOpts.Features.size()) { + llvm::SubtargetFeatures Features; + for (std::vector<std::string>::const_iterator + it = TargetOpts.Features.begin(), + ie = TargetOpts.Features.end(); it != ie; ++it) + Features.AddFeature(*it); + FuncAttrs.addAttribute("target-features", Features.getString()); + } } QualType RetTy = FI.getReturnType(); |