diff options
| author | Shankar Easwaran <shankare@codeaurora.org> | 2013-08-21 22:57:10 +0000 |
|---|---|---|
| committer | Shankar Easwaran <shankare@codeaurora.org> | 2013-08-21 22:57:10 +0000 |
| commit | e44104b001aab770b17bbbb00f5c676d1fe830e3 (patch) | |
| tree | a2c302c2f79f107ad9b54852512cdd5afb41e303 /lld/unittests | |
| parent | 0dc00645a26a85faf1b7cc93b9d5bae72f7ffcce (diff) | |
| download | bcm5719-llvm-e44104b001aab770b17bbbb00f5c676d1fe830e3.tar.gz bcm5719-llvm-e44104b001aab770b17bbbb00f5c676d1fe830e3.zip | |
add InputGraph functionality
llvm-svn: 188958
Diffstat (limited to 'lld/unittests')
| -rw-r--r-- | lld/unittests/DriverTests/DarwinLdDriverTest.cpp | 2 | ||||
| -rw-r--r-- | lld/unittests/DriverTests/DriverTest.h | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lld/unittests/DriverTests/DarwinLdDriverTest.cpp b/lld/unittests/DriverTests/DarwinLdDriverTest.cpp index de1b306b25d..2fb4df3612f 100644 --- a/lld/unittests/DriverTests/DarwinLdDriverTest.cpp +++ b/lld/unittests/DriverTests/DarwinLdDriverTest.cpp @@ -15,7 +15,7 @@ #include "DriverTest.h" #include "lld/ReaderWriter/MachOLinkingContext.h" -#include "../../lib/ReaderWriter/MachO/MachOFormat.hpp" +#include "lld/ReaderWriter/MachOFormat.hpp" using namespace llvm; using namespace lld; diff --git a/lld/unittests/DriverTests/DriverTest.h b/lld/unittests/DriverTests/DriverTest.h index 1090828ddd0..0ad19185528 100644 --- a/lld/unittests/DriverTests/DriverTest.h +++ b/lld/unittests/DriverTests/DriverTest.h @@ -30,11 +30,14 @@ protected: std::string &errorMessage() { return _errorMessage; } // Convenience method for getting number of input files. - int inputFileCount() { return linkingContext()->inputFiles().size(); } + int inputFileCount() { return linkingContext()->inputGraph().numFiles(); } // Convenience method for getting i'th input files name. std::string inputFile(unsigned index) { - return linkingContext()->inputFiles()[index].getPath().str(); + const InputElement &inputElement = linkingContext()->inputGraph()[index]; + if (inputElement.kind() == InputElement::Kind::File) + return (llvm::dyn_cast<FileNode>(&inputElement))->path(*linkingContext()); + assert(0 && "not handling other types of input files"); } // For unit tests to call driver with various command lines. |

