diff options
author | Dale Johannesen <dalej@apple.com> | 2009-02-05 01:49:45 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-02-05 01:49:45 +0000 |
commit | 49de98214b82fefeb8f16efbf8cdd8813a85469b (patch) | |
tree | 59d9fe3c8fd629dad52bd0a6a9760c95cf9dbbe3 /utils/TableGen/CodeGenTarget.cpp | |
parent | 2fabcb27761e0f07368f065fda0144d824e1e51c (diff) |
Reapply 63765. Patches for clang and llvm-gcc to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r-- | utils/TableGen/CodeGenTarget.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp index 274cc78c35..9ef64d66b5 100644 --- a/utils/TableGen/CodeGenTarget.cpp +++ b/utils/TableGen/CodeGenTarget.cpp @@ -426,13 +426,17 @@ ComplexPattern::ComplexPattern(Record *R) { // CodeGenIntrinsic Implementation //===----------------------------------------------------------------------===// -std::vector<CodeGenIntrinsic> llvm::LoadIntrinsics(const RecordKeeper &RC) { +std::vector<CodeGenIntrinsic> llvm::LoadIntrinsics(const RecordKeeper &RC, + bool TargetOnly) { std::vector<Record*> I = RC.getAllDerivedDefinitions("Intrinsic"); std::vector<CodeGenIntrinsic> Result; - for (unsigned i = 0, e = I.size(); i != e; ++i) - Result.push_back(CodeGenIntrinsic(I[i])); + for (unsigned i = 0, e = I.size(); i != e; ++i) { + bool isTarget = I[i]->getValueAsBit("isTarget"); + if (isTarget == TargetOnly) + Result.push_back(CodeGenIntrinsic(I[i])); + } return Result; } |