InputInfo constructor arg

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

InputInfo constructor arg

Mike Miller
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
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: InputInfo constructor arg

Mike Miller
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 <[hidden email]> 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
>
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev