[cfe-dev] InputInfo constructor arg

Mike Miller michael.g.miller at gmail.com
Fri May 14 21:17:12 PDT 2010


Looking at the constructor again, I realized I was being very stupid
:). I didn't need to use the _InputArg constructor, but instead the
file that took in the filename as an arg. Anyway, for future
reference, what I did was:

      driver::InputInfo Input(assemblyFile.c_str(),driver::types::TY_Asm,NULL);

where assemblyFile.c_str() is the filename of the assembly file.

HTH,
Mike

On Fri, May 14, 2010 at 6:14 PM, Mike Miller <michael.g.miller at gmail.com> wrote:
> Hi,
>
> I'm trying to assemble a file output by an EmitAssembly action. The
> runtime assert I hit is "Assertion failed: (isInputArg() && "Invalid
> accessor."), function getInputArg, file
> /Volumes/Data/Users/mike/llvm/tools/clang/lib/Driver/InputInfo.h, line
> 76"
>
> I traced down the assert to the fact that when constructing the
> InputInfo for my assembly file, I wasn't using the "InputInfo(const
> Arg *_InputArg, types::ID _Type, const char *_BaseInput)" constructor.
> However, I have no idea what "_InputArg" is supposed to represent. Can
> someone explain how I'd construct an appropriate argument to represent
> an assembly file?
>
> Thanks!
> Mike
>



More information about the cfe-dev mailing list