diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-19 07:29:38 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-19 07:29:38 +0000 |
commit | 115a79277edababaf1b26e3654044ae983197679 (patch) | |
tree | 4b564221de8b5cc2a3c9937464cccc5e0186876e /lib/Driver/Driver.cpp | |
parent | 42f7fc23044cc736db77878734258d35ad3dfe66 (diff) |
Driver: Handle "linker input" arguments.
- Make InputInfo a variant of filename, pipe, input argument,
nothing.
- Leave a FIXME in InputInfo that this should be revisited.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index b147bb3a41..c330707d34 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -697,12 +697,15 @@ void Driver::BuildJobsForAction(Compilation &C, UsePipes = false; if (const InputAction *IA = dyn_cast<InputAction>(A)) { - // FIXME: This is broken, linker inputs won't work here. - assert(isa<PositionalArg>(IA->getInputArg()) && "FIXME: Linker inputs"); - - IA->getInputArg().claim(); - const char *Name = IA->getInputArg().getValue(C.getArgs()); - Result = InputInfo(Name, A->getType(), Name); + // FIXME: It would be nice to not claim this here; maybe the old + // scheme of just using Args was better? + const Arg &Input = IA->getInputArg(); + Input.claim(); + if (isa<PositionalArg>(Input)) { + const char *Name = Input.getValue(C.getArgs()); + Result = InputInfo(Name, A->getType(), Name); + } else + Result = InputInfo(&Input, A->getType(), ""); return; } |