LLVM command options in Visual Studio

Thank you for your kind explanation.
I did it as you mentioned.
That is, I set '-march=x86 hello.bc' in the Command Arguments.
(I also set my compiled LLC, i.e., LLVM_ROOT_DIR\win32\debug\llc.exe, in the property name Command.)

But, when I made a breakpoint in main( ) of llc.cpp and then started to debug I found the 'InputFilename'(llc.cpp:176) is shown like {???}. Therefore it didn't proceed further, spitting out 'bytecode didn't read correctly.'
(Of course, my bytecode was trasferred to my computer as binary.)

Would you mind telling me what seems my problem?
Thank you so much.

Seung Jae Lee

Seung Jae Lee wrote:

Thank you for your kind explanation.
I did it as you mentioned.
That is, I set '-march=x86 hello.bc' in the Command Arguments.
(I also set my compiled LLC, i.e., LLVM_ROOT_DIR\win32\debug\llc.exe, in the property name Command.)
  
You didn't need to do this. The default of $(TargetPath) is correct.

But, when I made a breakpoint in main( ) of llc.cpp and then started to debug I found the 'InputFilename'(llc.cpp:176) is shown like {???}. Therefore it didn't proceed

You need to expand the object into its component members by clicking on the +. You'll see: 'llvm::cl::opt_storage<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,0,1> {"hello.bc"}' as the second field of the object.

further, spitting out 'bytecode didn't read correctly.'
(Of course, my bytecode was trasferred to my computer as binary.)
  
Can't help you here. I have no idea why your hello.bc is corrupted. All I can suggest is to step through the bytecode reader and see why it's unhappy (there should be a reason following "bytecode didn't read correctly"). You might also try specifying hello.bc with a full path, or setting the Working Directory to where the file resides.