aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r--lib/Driver/Driver.cpp15
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;
}