Home | History | Annotate | Download | only in Script
      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 
     14 using namespace mcld;
     15 
     16 //===----------------------------------------------------------------------===//
     17 // SearchDirCmd
     18 //===----------------------------------------------------------------------===//
     19 SearchDirCmd::SearchDirCmd(const std::string& pPath)
     20   : ScriptCommand(ScriptCommand::SEARCH_DIR),
     21     m_Path(pPath)
     22 {
     23 }
     24 
     25 SearchDirCmd::~SearchDirCmd()
     26 {
     27 }
     28 
     29 void SearchDirCmd::dump() const
     30 {
     31   mcld::outs() << "SEARCH_DIR ( " << m_Path << " )\n";
     32 }
     33 
     34 void SearchDirCmd::activate(Module& pModule)
     35 {
     36   pModule.getScript().directories().insert(m_Path);
     37 }
     38 
     39