Add sensible constructor.

git-svn-id: http://root.cern.ch/svn/root/trunk@46319 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
Vassil Vassilev 2012-10-04 16:03:05 +00:00
parent a7261215a3
commit f8d42d206f
2 changed files with 15 additions and 2 deletions

View File

@ -10,6 +10,7 @@
#include "clang/Sema/ExternalSemaSource.h"
#include "clang/Sema/Weak.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include <utility>
@ -36,10 +37,15 @@ namespace cling {
class MultiplexExternalSemaSource : public clang::ExternalSemaSource {
private:
llvm::SmallVector<ExternalSemaSource*, 4> m_Sources;
llvm::SmallVector<ExternalSemaSource*, 4> m_Sources; // doesn't own them.
public:
MultiplexExternalSemaSource() { }
///\brief Constructs the external source with given elements.
///
///\param[in] sources - Array of ExternalSemaSources.
///
MultiplexExternalSemaSource(llvm::ArrayRef<ExternalSemaSource*> sources);
~MultiplexExternalSemaSource();

View File

@ -11,6 +11,13 @@
using namespace clang;
namespace cling {
MultiplexExternalSemaSource::MultiplexExternalSemaSource(
llvm::ArrayRef<ExternalSemaSource*> sources) {
for (size_t i = 0; i < sources.size(); ++i)
m_Sources.push_back(sources[i]);
}
// pin the vtable here.
MultiplexExternalSemaSource::~MultiplexExternalSemaSource() {}