Readdress r236990, use of static members on a non-static variable.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 11 May 2015 22:20:48 +0000 (22:20 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 11 May 2015 22:20:48 +0000 (22:20 +0000)
commitbbd301d97a8440d1cb08a64372f23de677ce05e8
tree3abfea4523ffbc22ea7458bc01e9f13d8d253b27
parentaeda4909767d802ed96115b8e3e6c6f394f5a96e
Readdress r236990, use of static members on a non-static variable.

The TargetRegistry is just a namespace-like class, instantiated in one
place to use a range-based for loop. Instead, expose access to the
registry via a range-based 'targets()' function instead. This makes most
uses a bit awkward/more verbose - but eventually we should just add a
range-based find_if function which will streamline these functions. I'm
happy to mkae them a bit awkward in the interim as encouragement to
improve the algorithms in time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237059 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/TargetRegistry.h
lib/ExecutionEngine/TargetSelect.cpp
lib/Support/TargetRegistry.cpp
lib/Target/TargetMachineC.cpp
unittests/Support/TargetRegistry.cpp