projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49b301c
)
add a helper method.
author
Chris Lattner
<sabre@nondot.org>
Sun, 20 Sep 2009 06:21:20 +0000
(06:21 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 20 Sep 2009 06:21:20 +0000
(06:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82376
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Target/TargetRegistry.h
patch
|
blob
|
history
diff --git
a/include/llvm/Target/TargetRegistry.h
b/include/llvm/Target/TargetRegistry.h
index 8042d2363677b415f08706d08304809ebb59cee9..a73f2e21e692384e2b9c6710d0a982cc185e18e8 100644
(file)
--- a/
include/llvm/Target/TargetRegistry.h
+++ b/
include/llvm/Target/TargetRegistry.h
@@
-268,6
+268,13
@@
namespace llvm {
/// @name Registry Access
/// @{
+ static unsigned getNumTargets() {
+ unsigned Res = 0;
+ for (iterator I = begin(), E = end(); I != E; ++I)
+ ++Res;
+ return Res;
+ }
+
static iterator begin();
static iterator end() { return iterator(); }