SearchDirCmd.cpp revision 87f34658dec9097d987d254a990ea7f311bfc95f
1//===- SearchDirCmd.cpp ---------------------------------------------------===// 2// 3// The MCLinker Project 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9#include <mcld/Script/SearchDirCmd.h> 10#include <mcld/Support/raw_ostream.h> 11#include <mcld/LinkerScript.h> 12#include <mcld/Module.h> 13 14using namespace mcld; 15 16//===----------------------------------------------------------------------===// 17// SearchDirCmd 18//===----------------------------------------------------------------------===// 19SearchDirCmd::SearchDirCmd(const std::string& pPath) 20 : ScriptCommand(ScriptCommand::SEARCH_DIR), 21 m_Path(pPath) 22{ 23} 24 25SearchDirCmd::~SearchDirCmd() 26{ 27} 28 29void SearchDirCmd::dump() const 30{ 31 mcld::outs() << "SEARCH_DIR ( " << m_Path << " )\n"; 32} 33 34void SearchDirCmd::activate(Module& pModule) 35{ 36 pModule.getScript().directories().insert(m_Path); 37} 38 39